proteus  1.5.1
C/C++/Fortran libraries
ADR.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.25.2 */
2 
3 #define PY_SSIZE_T_CLEAN
4 #include "Python.h"
5 #ifndef Py_PYTHON_H
6  #error Python headers needed to compile C extensions, please install development version of Python.
7 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
8  #error Cython requires Python 2.6+ or Python 3.2+.
9 #else
10 #define CYTHON_ABI "0_25_2"
11 #include <stddef.h>
12 #ifndef offsetof
13  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
14 #endif
15 #if !defined(WIN32) && !defined(MS_WINDOWS)
16  #ifndef __stdcall
17  #define __stdcall
18  #endif
19  #ifndef __cdecl
20  #define __cdecl
21  #endif
22  #ifndef __fastcall
23  #define __fastcall
24  #endif
25 #endif
26 #ifndef DL_IMPORT
27  #define DL_IMPORT(t) t
28 #endif
29 #ifndef DL_EXPORT
30  #define DL_EXPORT(t) t
31 #endif
32 #ifndef HAVE_LONG_LONG
33  #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
34  #define HAVE_LONG_LONG
35  #endif
36 #endif
37 #ifndef PY_LONG_LONG
38  #define PY_LONG_LONG LONG_LONG
39 #endif
40 #ifndef Py_HUGE_VAL
41  #define Py_HUGE_VAL HUGE_VAL
42 #endif
43 #ifdef PYPY_VERSION
44  #define CYTHON_COMPILING_IN_PYPY 1
45  #define CYTHON_COMPILING_IN_PYSTON 0
46  #define CYTHON_COMPILING_IN_CPYTHON 0
47  #undef CYTHON_USE_TYPE_SLOTS
48  #define CYTHON_USE_TYPE_SLOTS 0
49  #undef CYTHON_USE_ASYNC_SLOTS
50  #define CYTHON_USE_ASYNC_SLOTS 0
51  #undef CYTHON_USE_PYLIST_INTERNALS
52  #define CYTHON_USE_PYLIST_INTERNALS 0
53  #undef CYTHON_USE_UNICODE_INTERNALS
54  #define CYTHON_USE_UNICODE_INTERNALS 0
55  #undef CYTHON_USE_UNICODE_WRITER
56  #define CYTHON_USE_UNICODE_WRITER 0
57  #undef CYTHON_USE_PYLONG_INTERNALS
58  #define CYTHON_USE_PYLONG_INTERNALS 0
59  #undef CYTHON_AVOID_BORROWED_REFS
60  #define CYTHON_AVOID_BORROWED_REFS 1
61  #undef CYTHON_ASSUME_SAFE_MACROS
62  #define CYTHON_ASSUME_SAFE_MACROS 0
63  #undef CYTHON_UNPACK_METHODS
64  #define CYTHON_UNPACK_METHODS 0
65  #undef CYTHON_FAST_THREAD_STATE
66  #define CYTHON_FAST_THREAD_STATE 0
67  #undef CYTHON_FAST_PYCALL
68  #define CYTHON_FAST_PYCALL 0
69 #elif defined(PYSTON_VERSION)
70  #define CYTHON_COMPILING_IN_PYPY 0
71  #define CYTHON_COMPILING_IN_PYSTON 1
72  #define CYTHON_COMPILING_IN_CPYTHON 0
73  #ifndef CYTHON_USE_TYPE_SLOTS
74  #define CYTHON_USE_TYPE_SLOTS 1
75  #endif
76  #undef CYTHON_USE_ASYNC_SLOTS
77  #define CYTHON_USE_ASYNC_SLOTS 0
78  #undef CYTHON_USE_PYLIST_INTERNALS
79  #define CYTHON_USE_PYLIST_INTERNALS 0
80  #ifndef CYTHON_USE_UNICODE_INTERNALS
81  #define CYTHON_USE_UNICODE_INTERNALS 1
82  #endif
83  #undef CYTHON_USE_UNICODE_WRITER
84  #define CYTHON_USE_UNICODE_WRITER 0
85  #undef CYTHON_USE_PYLONG_INTERNALS
86  #define CYTHON_USE_PYLONG_INTERNALS 0
87  #ifndef CYTHON_AVOID_BORROWED_REFS
88  #define CYTHON_AVOID_BORROWED_REFS 0
89  #endif
90  #ifndef CYTHON_ASSUME_SAFE_MACROS
91  #define CYTHON_ASSUME_SAFE_MACROS 1
92  #endif
93  #ifndef CYTHON_UNPACK_METHODS
94  #define CYTHON_UNPACK_METHODS 1
95  #endif
96  #undef CYTHON_FAST_THREAD_STATE
97  #define CYTHON_FAST_THREAD_STATE 0
98  #undef CYTHON_FAST_PYCALL
99  #define CYTHON_FAST_PYCALL 0
100 #else
101  #define CYTHON_COMPILING_IN_PYPY 0
102  #define CYTHON_COMPILING_IN_PYSTON 0
103  #define CYTHON_COMPILING_IN_CPYTHON 1
104  #ifndef CYTHON_USE_TYPE_SLOTS
105  #define CYTHON_USE_TYPE_SLOTS 1
106  #endif
107  #if PY_MAJOR_VERSION < 3
108  #undef CYTHON_USE_ASYNC_SLOTS
109  #define CYTHON_USE_ASYNC_SLOTS 0
110  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
111  #define CYTHON_USE_ASYNC_SLOTS 1
112  #endif
113  #if PY_VERSION_HEX < 0x02070000
114  #undef CYTHON_USE_PYLONG_INTERNALS
115  #define CYTHON_USE_PYLONG_INTERNALS 0
116  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
117  #define CYTHON_USE_PYLONG_INTERNALS 1
118  #endif
119  #ifndef CYTHON_USE_PYLIST_INTERNALS
120  #define CYTHON_USE_PYLIST_INTERNALS 1
121  #endif
122  #ifndef CYTHON_USE_UNICODE_INTERNALS
123  #define CYTHON_USE_UNICODE_INTERNALS 1
124  #endif
125  #if PY_VERSION_HEX < 0x030300F0
126  #undef CYTHON_USE_UNICODE_WRITER
127  #define CYTHON_USE_UNICODE_WRITER 0
128  #elif !defined(CYTHON_USE_UNICODE_WRITER)
129  #define CYTHON_USE_UNICODE_WRITER 1
130  #endif
131  #ifndef CYTHON_AVOID_BORROWED_REFS
132  #define CYTHON_AVOID_BORROWED_REFS 0
133  #endif
134  #ifndef CYTHON_ASSUME_SAFE_MACROS
135  #define CYTHON_ASSUME_SAFE_MACROS 1
136  #endif
137  #ifndef CYTHON_UNPACK_METHODS
138  #define CYTHON_UNPACK_METHODS 1
139  #endif
140  #ifndef CYTHON_FAST_THREAD_STATE
141  #define CYTHON_FAST_THREAD_STATE 1
142  #endif
143  #ifndef CYTHON_FAST_PYCALL
144  #define CYTHON_FAST_PYCALL 1
145  #endif
146 #endif
147 #if !defined(CYTHON_FAST_PYCCALL)
148 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
149 #endif
150 #if CYTHON_USE_PYLONG_INTERNALS
151  #include "longintrepr.h"
152  #undef SHIFT
153  #undef BASE
154  #undef MASK
155 #endif
156 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
157  #define Py_OptimizeFlag 0
158 #endif
159 #define __PYX_BUILD_PY_SSIZE_T "n"
160 #define CYTHON_FORMAT_SSIZE_T "z"
161 #if PY_MAJOR_VERSION < 3
162  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
163  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
164  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
165  #define __Pyx_DefaultClassType PyClass_Type
166 #else
167  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
168  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
169  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
170  #define __Pyx_DefaultClassType PyType_Type
171 #endif
172 #ifndef Py_TPFLAGS_CHECKTYPES
173  #define Py_TPFLAGS_CHECKTYPES 0
174 #endif
175 #ifndef Py_TPFLAGS_HAVE_INDEX
176  #define Py_TPFLAGS_HAVE_INDEX 0
177 #endif
178 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
179  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
180 #endif
181 #ifndef Py_TPFLAGS_HAVE_FINALIZE
182  #define Py_TPFLAGS_HAVE_FINALIZE 0
183 #endif
184 #ifndef METH_FASTCALL
185  #define METH_FASTCALL 0x80
186  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
187  Py_ssize_t nargs, PyObject *kwnames);
188 #else
189  #define __Pyx_PyCFunctionFast _PyCFunctionFast
190 #endif
191 #if CYTHON_FAST_PYCCALL
192 #define __Pyx_PyFastCFunction_Check(func)\
193  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
194 #else
195 #define __Pyx_PyFastCFunction_Check(func) 0
196 #endif
197 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
198  #define CYTHON_PEP393_ENABLED 1
199  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
200  0 : _PyUnicode_Ready((PyObject *)(op)))
201  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
202  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
203  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
204  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
205  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
206  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
207  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
208  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
209 #else
210  #define CYTHON_PEP393_ENABLED 0
211  #define PyUnicode_1BYTE_KIND 1
212  #define PyUnicode_2BYTE_KIND 2
213  #define PyUnicode_4BYTE_KIND 4
214  #define __Pyx_PyUnicode_READY(op) (0)
215  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
216  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
217  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
218  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
219  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
220  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
221  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
222  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
223 #endif
224 #if CYTHON_COMPILING_IN_PYPY
225  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
226  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
227 #else
228  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
229  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
230  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
231 #endif
232 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
233  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
234 #endif
235 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
236  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
237 #endif
238 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
239  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
240 #endif
241 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
242  #define PyObject_Malloc(s) PyMem_Malloc(s)
243  #define PyObject_Free(p) PyMem_Free(p)
244  #define PyObject_Realloc(p) PyMem_Realloc(p)
245 #endif
246 #if CYTHON_COMPILING_IN_PYSTON
247  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
248  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
249 #else
250  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
251  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
252 #endif
253 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
254 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
255 #if PY_MAJOR_VERSION >= 3
256  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
257 #else
258  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
259 #endif
260 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
261  #define PyObject_ASCII(o) PyObject_Repr(o)
262 #endif
263 #if PY_MAJOR_VERSION >= 3
264  #define PyBaseString_Type PyUnicode_Type
265  #define PyStringObject PyUnicodeObject
266  #define PyString_Type PyUnicode_Type
267  #define PyString_Check PyUnicode_Check
268  #define PyString_CheckExact PyUnicode_CheckExact
269 #endif
270 #if PY_MAJOR_VERSION >= 3
271  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
272  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
273 #else
274  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
275  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
276 #endif
277 #ifndef PySet_CheckExact
278  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
279 #endif
280 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
281 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
282 #if PY_MAJOR_VERSION >= 3
283  #define PyIntObject PyLongObject
284  #define PyInt_Type PyLong_Type
285  #define PyInt_Check(op) PyLong_Check(op)
286  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
287  #define PyInt_FromString PyLong_FromString
288  #define PyInt_FromUnicode PyLong_FromUnicode
289  #define PyInt_FromLong PyLong_FromLong
290  #define PyInt_FromSize_t PyLong_FromSize_t
291  #define PyInt_FromSsize_t PyLong_FromSsize_t
292  #define PyInt_AsLong PyLong_AsLong
293  #define PyInt_AS_LONG PyLong_AS_LONG
294  #define PyInt_AsSsize_t PyLong_AsSsize_t
295  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
296  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
297  #define PyNumber_Int PyNumber_Long
298 #endif
299 #if PY_MAJOR_VERSION >= 3
300  #define PyBoolObject PyLongObject
301 #endif
302 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
303  #ifndef PyUnicode_InternFromString
304  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
305  #endif
306 #endif
307 #if PY_VERSION_HEX < 0x030200A4
308  typedef long Py_hash_t;
309  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
310  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
311 #else
312  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
313  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
314 #endif
315 #if PY_MAJOR_VERSION >= 3
316  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
317 #else
318  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
319 #endif
320 #if CYTHON_USE_ASYNC_SLOTS
321  #if PY_VERSION_HEX >= 0x030500B1
322  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
323  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
324  #else
325  typedef struct {
326  unaryfunc am_await;
327  unaryfunc am_aiter;
328  unaryfunc am_anext;
329  } __Pyx_PyAsyncMethodsStruct;
330  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
331  #endif
332 #else
333  #define __Pyx_PyType_AsAsync(obj) NULL
334 #endif
335 #ifndef CYTHON_RESTRICT
336  #if defined(__GNUC__)
337  #define CYTHON_RESTRICT __restrict__
338  #elif defined(_MSC_VER) && _MSC_VER >= 1400
339  #define CYTHON_RESTRICT __restrict
340  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
341  #define CYTHON_RESTRICT restrict
342  #else
343  #define CYTHON_RESTRICT
344  #endif
345 #endif
346 #ifndef CYTHON_UNUSED
347 # if defined(__GNUC__)
348 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
349 # define CYTHON_UNUSED __attribute__ ((__unused__))
350 # else
351 # define CYTHON_UNUSED
352 # endif
353 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
354 # define CYTHON_UNUSED __attribute__ ((__unused__))
355 # else
356 # define CYTHON_UNUSED
357 # endif
358 #endif
359 #ifndef CYTHON_MAYBE_UNUSED_VAR
360 # if defined(__cplusplus)
361  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
362 # else
363 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
364 # endif
365 #endif
366 #ifndef CYTHON_NCP_UNUSED
367 # if CYTHON_COMPILING_IN_CPYTHON
368 # define CYTHON_NCP_UNUSED
369 # else
370 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
371 # endif
372 #endif
373 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
374 
375 #ifndef __cplusplus
376  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
377 #endif
378 #ifndef CYTHON_INLINE
379  #if defined(__clang__)
380  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
381  #else
382  #define CYTHON_INLINE inline
383  #endif
384 #endif
385 template<typename T>
386 void __Pyx_call_destructor(T& x) {
387  x.~T();
388 }
389 template<typename T>
390 class __Pyx_FakeReference {
391  public:
392  __Pyx_FakeReference() : ptr(NULL) { }
393  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
394  T *operator->() { return ptr; }
395  T *operator&() { return ptr; }
396  operator T&() { return *ptr; }
397  template<typename U> bool operator ==(U other) { return *ptr == other; }
398  template<typename U> bool operator !=(U other) { return *ptr != other; }
399  private:
400  T *ptr;
401 };
402 
403 #if defined(WIN32) || defined(MS_WINDOWS)
404  #define _USE_MATH_DEFINES
405 #endif
406 #include <math.h>
407 #ifdef NAN
408 #define __PYX_NAN() ((float) NAN)
409 #else
410 static CYTHON_INLINE float __PYX_NAN() {
411  float value;
412  memset(&value, 0xFF, sizeof(value));
413  return value;
414 }
415 #endif
416 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
417 #define __Pyx_truncl trunc
418 #else
419 #define __Pyx_truncl truncl
420 #endif
421 
422 
423 #define __PYX_ERR(f_index, lineno, Ln_error) \
424 { \
425  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
426 }
427 
428 #if PY_MAJOR_VERSION >= 3
429  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
430  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
431 #else
432  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
433  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
434 #endif
435 
436 #ifndef __PYX_EXTERN_C
437  #ifdef __cplusplus
438  #define __PYX_EXTERN_C extern "C"
439  #else
440  #define __PYX_EXTERN_C extern
441  #endif
442 #endif
443 
444 #define __PYX_HAVE__ADR
445 #define __PYX_HAVE_API__ADR
446 #include <string.h>
447 #include <stdio.h>
448 #include <stdlib.h>
449 #include "numpy/arrayobject.h"
450 #include "numpy/ufuncobject.h"
451 #include "ADR.h"
452 #ifdef _OPENMP
453 #include <omp.h>
454 #endif /* _OPENMP */
455 
456 #ifdef PYREX_WITHOUT_ASSERTIONS
457 #define CYTHON_WITHOUT_ASSERTIONS
458 #endif
459 
460 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
461  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
462 
463 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
464 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
465 #define __PYX_DEFAULT_STRING_ENCODING ""
466 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
467 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
468 #define __Pyx_uchar_cast(c) ((unsigned char)c)
469 #define __Pyx_long_cast(x) ((long)x)
470 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
471  (sizeof(type) < sizeof(Py_ssize_t)) ||\
472  (sizeof(type) > sizeof(Py_ssize_t) &&\
473  likely(v < (type)PY_SSIZE_T_MAX ||\
474  v == (type)PY_SSIZE_T_MAX) &&\
475  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
476  v == (type)PY_SSIZE_T_MIN))) ||\
477  (sizeof(type) == sizeof(Py_ssize_t) &&\
478  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
479  v == (type)PY_SSIZE_T_MAX))) )
480 #if defined (__cplusplus) && __cplusplus >= 201103L
481  #include <cstdlib>
482  #define __Pyx_sst_abs(value) std::abs(value)
483 #elif SIZEOF_INT >= SIZEOF_SIZE_T
484  #define __Pyx_sst_abs(value) abs(value)
485 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
486  #define __Pyx_sst_abs(value) labs(value)
487 #elif defined (_MSC_VER) && defined (_M_X64)
488  #define __Pyx_sst_abs(value) _abs64(value)
489 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
490  #define __Pyx_sst_abs(value) llabs(value)
491 #elif defined (__GNUC__)
492  #define __Pyx_sst_abs(value) __builtin_llabs(value)
493 #else
494  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
495 #endif
496 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
497 static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
498 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
499 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
500 #define __Pyx_PyBytes_FromString PyBytes_FromString
501 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
502 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
503 #if PY_MAJOR_VERSION < 3
504  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
505  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
506 #else
507  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
508  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
509 #endif
510 #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
511 #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
512 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
513 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
514 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
515 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
516 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
517 #if PY_MAJOR_VERSION < 3
518 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
519 {
520  const Py_UNICODE *u_end = u;
521  while (*u_end++) ;
522  return (size_t)(u_end - u - 1);
523 }
524 #else
525 #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
526 #endif
527 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
528 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
529 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
530 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
531 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
532 #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
533 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
534 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
535 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
536 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
537 #if CYTHON_ASSUME_SAFE_MACROS
538 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
539 #else
540 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
541 #endif
542 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
543 #if PY_MAJOR_VERSION >= 3
544 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
545 #else
546 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
547 #endif
548 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
549 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
550 static int __Pyx_sys_getdefaultencoding_not_ascii;
551 static int __Pyx_init_sys_getdefaultencoding_params(void) {
552  PyObject* sys;
553  PyObject* default_encoding = NULL;
554  PyObject* ascii_chars_u = NULL;
555  PyObject* ascii_chars_b = NULL;
556  const char* default_encoding_c;
557  sys = PyImport_ImportModule("sys");
558  if (!sys) goto bad;
559  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
560  Py_DECREF(sys);
561  if (!default_encoding) goto bad;
562  default_encoding_c = PyBytes_AsString(default_encoding);
563  if (!default_encoding_c) goto bad;
564  if (strcmp(default_encoding_c, "ascii") == 0) {
565  __Pyx_sys_getdefaultencoding_not_ascii = 0;
566  } else {
567  char ascii_chars[128];
568  int c;
569  for (c = 0; c < 128; c++) {
570  ascii_chars[c] = c;
571  }
572  __Pyx_sys_getdefaultencoding_not_ascii = 1;
573  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
574  if (!ascii_chars_u) goto bad;
575  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
576  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
577  PyErr_Format(
578  PyExc_ValueError,
579  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
580  default_encoding_c);
581  goto bad;
582  }
583  Py_DECREF(ascii_chars_u);
584  Py_DECREF(ascii_chars_b);
585  }
586  Py_DECREF(default_encoding);
587  return 0;
588 bad:
589  Py_XDECREF(default_encoding);
590  Py_XDECREF(ascii_chars_u);
591  Py_XDECREF(ascii_chars_b);
592  return -1;
593 }
594 #endif
595 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
596 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
597 #else
598 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
599 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
600 static char* __PYX_DEFAULT_STRING_ENCODING;
601 static int __Pyx_init_sys_getdefaultencoding_params(void) {
602  PyObject* sys;
603  PyObject* default_encoding = NULL;
604  char* default_encoding_c;
605  sys = PyImport_ImportModule("sys");
606  if (!sys) goto bad;
607  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
608  Py_DECREF(sys);
609  if (!default_encoding) goto bad;
610  default_encoding_c = PyBytes_AsString(default_encoding);
611  if (!default_encoding_c) goto bad;
612  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
613  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
614  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
615  Py_DECREF(default_encoding);
616  return 0;
617 bad:
618  Py_XDECREF(default_encoding);
619  return -1;
620 }
621 #endif
622 #endif
623 
624 
625 /* Test for GCC > 2.95 */
626 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
627  #define likely(x) __builtin_expect(!!(x), 1)
628  #define unlikely(x) __builtin_expect(!!(x), 0)
629 #else /* !__GNUC__ or GCC < 2.95 */
630  #define likely(x) (x)
631  #define unlikely(x) (x)
632 #endif /* __GNUC__ */
633 
634 static PyObject *__pyx_m;
635 static PyObject *__pyx_d;
636 static PyObject *__pyx_b;
637 static PyObject *__pyx_empty_tuple;
638 static PyObject *__pyx_empty_bytes;
639 static PyObject *__pyx_empty_unicode;
640 static int __pyx_lineno;
641 static int __pyx_clineno = 0;
642 static const char * __pyx_cfilenm= __FILE__;
643 static const char *__pyx_filename;
644 
645 /* Header.proto */
646 #if !defined(CYTHON_CCOMPLEX)
647  #if defined(__cplusplus)
648  #define CYTHON_CCOMPLEX 1
649  #elif defined(_Complex_I)
650  #define CYTHON_CCOMPLEX 1
651  #else
652  #define CYTHON_CCOMPLEX 0
653  #endif
654 #endif
655 #if CYTHON_CCOMPLEX
656  #ifdef __cplusplus
657  #include <complex>
658  #else
659  #include <complex.h>
660  #endif
661 #endif
662 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
663  #undef _Complex_I
664  #define _Complex_I 1.0fj
665 #endif
666 
667 
668 static const char *__pyx_f[] = {
669  "proteus/ADR.pyx",
670  "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd",
671  "linux2/lib/python2.7/site-packages/Cython/Includes/cpython/type.pxd",
672 };
673 
674 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":725
675  * # in Cython to enable them only on the right systems.
676  *
677  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
678  * ctypedef npy_int16 int16_t
679  * ctypedef npy_int32 int32_t
680  */
681 typedef npy_int8 __pyx_t_5numpy_int8_t;
682 
683 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":726
684  *
685  * ctypedef npy_int8 int8_t
686  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
687  * ctypedef npy_int32 int32_t
688  * ctypedef npy_int64 int64_t
689  */
690 typedef npy_int16 __pyx_t_5numpy_int16_t;
691 
692 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":727
693  * ctypedef npy_int8 int8_t
694  * ctypedef npy_int16 int16_t
695  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
696  * ctypedef npy_int64 int64_t
697  * #ctypedef npy_int96 int96_t
698  */
699 typedef npy_int32 __pyx_t_5numpy_int32_t;
700 
701 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":728
702  * ctypedef npy_int16 int16_t
703  * ctypedef npy_int32 int32_t
704  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
705  * #ctypedef npy_int96 int96_t
706  * #ctypedef npy_int128 int128_t
707  */
708 typedef npy_int64 __pyx_t_5numpy_int64_t;
709 
710 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":732
711  * #ctypedef npy_int128 int128_t
712  *
713  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
714  * ctypedef npy_uint16 uint16_t
715  * ctypedef npy_uint32 uint32_t
716  */
717 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
718 
719 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":733
720  *
721  * ctypedef npy_uint8 uint8_t
722  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
723  * ctypedef npy_uint32 uint32_t
724  * ctypedef npy_uint64 uint64_t
725  */
726 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
727 
728 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":734
729  * ctypedef npy_uint8 uint8_t
730  * ctypedef npy_uint16 uint16_t
731  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
732  * ctypedef npy_uint64 uint64_t
733  * #ctypedef npy_uint96 uint96_t
734  */
735 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
736 
737 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":735
738  * ctypedef npy_uint16 uint16_t
739  * ctypedef npy_uint32 uint32_t
740  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
741  * #ctypedef npy_uint96 uint96_t
742  * #ctypedef npy_uint128 uint128_t
743  */
744 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
745 
746 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":739
747  * #ctypedef npy_uint128 uint128_t
748  *
749  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
750  * ctypedef npy_float64 float64_t
751  * #ctypedef npy_float80 float80_t
752  */
753 typedef npy_float32 __pyx_t_5numpy_float32_t;
754 
755 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":740
756  *
757  * ctypedef npy_float32 float32_t
758  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
759  * #ctypedef npy_float80 float80_t
760  * #ctypedef npy_float128 float128_t
761  */
762 typedef npy_float64 __pyx_t_5numpy_float64_t;
763 
764 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":749
765  * # The int types are mapped a bit surprising --
766  * # numpy.int corresponds to 'l' and numpy.long to 'q'
767  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
768  * ctypedef npy_longlong long_t
769  * ctypedef npy_longlong longlong_t
770  */
771 typedef npy_long __pyx_t_5numpy_int_t;
772 
773 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":750
774  * # numpy.int corresponds to 'l' and numpy.long to 'q'
775  * ctypedef npy_long int_t
776  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
777  * ctypedef npy_longlong longlong_t
778  *
779  */
780 typedef npy_longlong __pyx_t_5numpy_long_t;
781 
782 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":751
783  * ctypedef npy_long int_t
784  * ctypedef npy_longlong long_t
785  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
786  *
787  * ctypedef npy_ulong uint_t
788  */
789 typedef npy_longlong __pyx_t_5numpy_longlong_t;
790 
791 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":753
792  * ctypedef npy_longlong longlong_t
793  *
794  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
795  * ctypedef npy_ulonglong ulong_t
796  * ctypedef npy_ulonglong ulonglong_t
797  */
798 typedef npy_ulong __pyx_t_5numpy_uint_t;
799 
800 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":754
801  *
802  * ctypedef npy_ulong uint_t
803  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
804  * ctypedef npy_ulonglong ulonglong_t
805  *
806  */
807 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
808 
809 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":755
810  * ctypedef npy_ulong uint_t
811  * ctypedef npy_ulonglong ulong_t
812  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
813  *
814  * ctypedef npy_intp intp_t
815  */
816 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
817 
818 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":757
819  * ctypedef npy_ulonglong ulonglong_t
820  *
821  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
822  * ctypedef npy_uintp uintp_t
823  *
824  */
825 typedef npy_intp __pyx_t_5numpy_intp_t;
826 
827 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":758
828  *
829  * ctypedef npy_intp intp_t
830  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
831  *
832  * ctypedef npy_double float_t
833  */
834 typedef npy_uintp __pyx_t_5numpy_uintp_t;
835 
836 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":760
837  * ctypedef npy_uintp uintp_t
838  *
839  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
840  * ctypedef npy_double double_t
841  * ctypedef npy_longdouble longdouble_t
842  */
843 typedef npy_double __pyx_t_5numpy_float_t;
844 
845 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":761
846  *
847  * ctypedef npy_double float_t
848  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
849  * ctypedef npy_longdouble longdouble_t
850  *
851  */
852 typedef npy_double __pyx_t_5numpy_double_t;
853 
854 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":762
855  * ctypedef npy_double float_t
856  * ctypedef npy_double double_t
857  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
858  *
859  * ctypedef npy_cfloat cfloat_t
860  */
861 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
862 /* Declarations.proto */
863 #if CYTHON_CCOMPLEX
864  #ifdef __cplusplus
865  typedef ::std::complex< float > __pyx_t_float_complex;
866  #else
867  typedef float _Complex __pyx_t_float_complex;
868  #endif
869 #else
870  typedef struct { float real, imag; } __pyx_t_float_complex;
871 #endif
872 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
873 
874 /* Declarations.proto */
875 #if CYTHON_CCOMPLEX
876  #ifdef __cplusplus
877  typedef ::std::complex< double > __pyx_t_double_complex;
878  #else
879  typedef double _Complex __pyx_t_double_complex;
880  #endif
881 #else
882  typedef struct { double real, imag; } __pyx_t_double_complex;
883 #endif
884 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
885 
886 
887 /*--- Type declarations ---*/
888 struct __pyx_obj_3ADR_ADR;
889 
890 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":764
891  * ctypedef npy_longdouble longdouble_t
892  *
893  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
894  * ctypedef npy_cdouble cdouble_t
895  * ctypedef npy_clongdouble clongdouble_t
896  */
897 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
898 
899 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":765
900  *
901  * ctypedef npy_cfloat cfloat_t
902  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
903  * ctypedef npy_clongdouble clongdouble_t
904  *
905  */
906 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
907 
908 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":766
909  * ctypedef npy_cfloat cfloat_t
910  * ctypedef npy_cdouble cdouble_t
911  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
912  *
913  * ctypedef npy_cdouble complex_t
914  */
915 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
916 
917 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768
918  * ctypedef npy_clongdouble clongdouble_t
919  *
920  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
921  *
922  * cdef inline object PyArray_MultiIterNew1(a):
923  */
924 typedef npy_cdouble __pyx_t_5numpy_complex_t;
925 
926 /* "ADR.pyx":140
927  *
928  *
929  * cdef class ADR: # <<<<<<<<<<<<<<
930  * """
931  * Optimized ADR member functions
932  */
933 struct __pyx_obj_3ADR_ADR {
934  PyObject_HEAD
935  proteus::cppADR_base *thisptr;
936 };
937 
938 
939 /* --- Runtime support code (head) --- */
940 /* Refnanny.proto */
941 #ifndef CYTHON_REFNANNY
942  #define CYTHON_REFNANNY 0
943 #endif
944 #if CYTHON_REFNANNY
945  typedef struct {
946  void (*INCREF)(void*, PyObject*, int);
947  void (*DECREF)(void*, PyObject*, int);
948  void (*GOTREF)(void*, PyObject*, int);
949  void (*GIVEREF)(void*, PyObject*, int);
950  void* (*SetupContext)(const char*, int, const char*);
951  void (*FinishContext)(void**);
952  } __Pyx_RefNannyAPIStruct;
953  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
954  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
955  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
956 #ifdef WITH_THREAD
957  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
958  if (acquire_gil) {\
959  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
960  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
961  PyGILState_Release(__pyx_gilstate_save);\
962  } else {\
963  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
964  }
965 #else
966  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
967  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
968 #endif
969  #define __Pyx_RefNannyFinishContext()\
970  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
971  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
972  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
973  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
974  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
975  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
976  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
977  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
978  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
979 #else
980  #define __Pyx_RefNannyDeclarations
981  #define __Pyx_RefNannySetupContext(name, acquire_gil)
982  #define __Pyx_RefNannyFinishContext()
983  #define __Pyx_INCREF(r) Py_INCREF(r)
984  #define __Pyx_DECREF(r) Py_DECREF(r)
985  #define __Pyx_GOTREF(r)
986  #define __Pyx_GIVEREF(r)
987  #define __Pyx_XINCREF(r) Py_XINCREF(r)
988  #define __Pyx_XDECREF(r) Py_XDECREF(r)
989  #define __Pyx_XGOTREF(r)
990  #define __Pyx_XGIVEREF(r)
991 #endif
992 #define __Pyx_XDECREF_SET(r, v) do {\
993  PyObject *tmp = (PyObject *) r;\
994  r = v; __Pyx_XDECREF(tmp);\
995  } while (0)
996 #define __Pyx_DECREF_SET(r, v) do {\
997  PyObject *tmp = (PyObject *) r;\
998  r = v; __Pyx_DECREF(tmp);\
999  } while (0)
1000 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1001 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1002 
1003 /* PyObjectGetAttrStr.proto */
1004 #if CYTHON_USE_TYPE_SLOTS
1005 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
1006  PyTypeObject* tp = Py_TYPE(obj);
1007  if (likely(tp->tp_getattro))
1008  return tp->tp_getattro(obj, attr_name);
1009 #if PY_MAJOR_VERSION < 3
1010  if (likely(tp->tp_getattr))
1011  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
1012 #endif
1013  return PyObject_GetAttr(obj, attr_name);
1014 }
1015 #else
1016 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1017 #endif
1018 
1019 /* GetBuiltinName.proto */
1020 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1021 
1022 /* RaiseArgTupleInvalid.proto */
1023 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1024  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1025 
1026 /* RaiseDoubleKeywords.proto */
1027 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1028 
1029 /* ParseKeywords.proto */
1030 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1031  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1032  const char* function_name);
1033 
1034 /* ArgTypeTest.proto */
1035 static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
1036  const char *name, int exact);
1037 
1038 /* PyCFunctionFastCall.proto */
1039 #if CYTHON_FAST_PYCCALL
1040 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1041 #else
1042 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1043 #endif
1044 
1045 /* PyFunctionFastCall.proto */
1046 #if CYTHON_FAST_PYCALL
1047 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1048  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1049 #if 1 || PY_VERSION_HEX < 0x030600B1
1050 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1051 #else
1052 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1053 #endif
1054 #endif
1055 
1056 /* PyObjectCall.proto */
1057 #if CYTHON_COMPILING_IN_CPYTHON
1058 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1059 #else
1060 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1061 #endif
1062 
1063 /* PyObjectCallMethO.proto */
1064 #if CYTHON_COMPILING_IN_CPYTHON
1065 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1066 #endif
1067 
1068 /* PyObjectCallOneArg.proto */
1069 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1070 
1071 /* PyObjectCallNoArg.proto */
1072 #if CYTHON_COMPILING_IN_CPYTHON
1073 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1074 #else
1075 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1076 #endif
1077 
1078 /* RaiseTooManyValuesToUnpack.proto */
1079 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1080 
1081 /* RaiseNeedMoreValuesToUnpack.proto */
1082 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1083 
1084 /* IterFinish.proto */
1085 static CYTHON_INLINE int __Pyx_IterFinish(void);
1086 
1087 /* UnpackItemEndCheck.proto */
1088 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
1089 
1090 /* ExtTypeTest.proto */
1091 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1092 
1093 /* GetModuleGlobalName.proto */
1094 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
1095 
1096 /* PyObjectSetAttrStr.proto */
1097 #if CYTHON_USE_TYPE_SLOTS
1098 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
1099 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
1100  PyTypeObject* tp = Py_TYPE(obj);
1101  if (likely(tp->tp_setattro))
1102  return tp->tp_setattro(obj, attr_name, value);
1103 #if PY_MAJOR_VERSION < 3
1104  if (likely(tp->tp_setattr))
1105  return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
1106 #endif
1107  return PyObject_SetAttr(obj, attr_name, value);
1108 }
1109 #else
1110 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
1111 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
1112 #endif
1113 
1114 /* ListAppend.proto */
1115 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1116 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1117  PyListObject* L = (PyListObject*) list;
1118  Py_ssize_t len = Py_SIZE(list);
1119  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1120  Py_INCREF(x);
1121  PyList_SET_ITEM(list, len, x);
1122  Py_SIZE(list) = len+1;
1123  return 0;
1124  }
1125  return PyList_Append(list, x);
1126 }
1127 #else
1128 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1129 #endif
1130 
1131 /* PyObjectCallMethod1.proto */
1132 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1133 
1134 /* append.proto */
1135 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
1136 
1137 /* PyIntBinop.proto */
1138 #if !CYTHON_COMPILING_IN_PYPY
1139 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1140 #else
1141 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
1142  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1143 #endif
1144 
1145 /* SliceObject.proto */
1146 #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
1147  __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
1148 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
1149  PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
1150  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1151  int has_cstart, int has_cstop, int wraparound);
1152 
1153 /* GetItemInt.proto */
1154 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1155  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1156  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1157  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1158  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1159 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1160  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1161  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1162  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1163 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1164  int wraparound, int boundscheck);
1165 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1166  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1167  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1168  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1169 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1170  int wraparound, int boundscheck);
1171 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1172 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1173  int is_list, int wraparound, int boundscheck);
1174 
1175 /* ListCompAppend.proto */
1176 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1177 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
1178  PyListObject* L = (PyListObject*) list;
1179  Py_ssize_t len = Py_SIZE(list);
1180  if (likely(L->allocated > len)) {
1181  Py_INCREF(x);
1182  PyList_SET_ITEM(list, len, x);
1183  Py_SIZE(list) = len+1;
1184  return 0;
1185  }
1186  return PyList_Append(list, x);
1187 }
1188 #else
1189 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1190 #endif
1191 
1192 /* SliceObject.proto */
1193 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
1194  PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
1195  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1196  int has_cstart, int has_cstop, int wraparound);
1197 
1198 /* Import.proto */
1199 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1200 
1201 /* ImportFrom.proto */
1202 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1203 
1204 /* IncludeStringH.proto */
1205 #include <string.h>
1206 
1207 /* BytesEquals.proto */
1208 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1209 
1210 /* UnicodeEquals.proto */
1211 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1212 
1213 /* StrEquals.proto */
1214 #if PY_MAJOR_VERSION >= 3
1215 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1216 #else
1217 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1218 #endif
1219 
1220 /* PyIntBinop.proto */
1221 #if !CYTHON_COMPILING_IN_PYPY
1222 static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1223 #else
1224 #define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
1225  PyObject_RichCompare(op1, op2, Py_EQ)
1226  #endif
1227 
1228 /* PyObjectCallMethod0.proto */
1229 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
1230 
1231 /* RaiseNoneIterError.proto */
1232 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1233 
1234 /* UnpackTupleError.proto */
1235 static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
1236 
1237 /* UnpackTuple2.proto */
1238 static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
1239  int is_tuple, int has_known_size, int decref_tuple);
1240 
1241 /* dict_iter.proto */
1242 static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
1243  Py_ssize_t* p_orig_length, int* p_is_dict);
1244 static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
1245  PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
1246 
1247 /* PyThreadStateGet.proto */
1248 #if CYTHON_FAST_THREAD_STATE
1249 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1250 #define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET();
1251 #else
1252 #define __Pyx_PyThreadState_declare
1253 #define __Pyx_PyThreadState_assign
1254 #endif
1255 
1256 /* PyErrFetchRestore.proto */
1257 #if CYTHON_FAST_THREAD_STATE
1258 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1259 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1260 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1261 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1262 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1263 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1264 #else
1265 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1266 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1267 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1268 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1269 #endif
1270 
1271 /* RaiseException.proto */
1272 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1273 
1274 /* DictGetItem.proto */
1275 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
1276 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
1277  PyObject *value;
1278  value = PyDict_GetItemWithError(d, key);
1279  if (unlikely(!value)) {
1280  if (!PyErr_Occurred()) {
1281  PyObject* args = PyTuple_Pack(1, key);
1282  if (likely(args))
1283  PyErr_SetObject(PyExc_KeyError, args);
1284  Py_XDECREF(args);
1285  }
1286  return NULL;
1287  }
1288  Py_INCREF(value);
1289  return value;
1290 }
1291 #else
1292  #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
1293 #endif
1294 
1295 /* SaveResetException.proto */
1296 #if CYTHON_FAST_THREAD_STATE
1297 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1298 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1299 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1300 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1301 #else
1302 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1303 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1304 #endif
1305 
1306 /* PyErrExceptionMatches.proto */
1307 #if CYTHON_FAST_THREAD_STATE
1308 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1309 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1310 #else
1311 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1312 #endif
1313 
1314 /* GetException.proto */
1315 #if CYTHON_FAST_THREAD_STATE
1316 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1317 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1318 #else
1319 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1320 #endif
1321 
1322 /* CalculateMetaclass.proto */
1323 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
1324 
1325 /* FetchCommonType.proto */
1326 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1327 
1328 /* CythonFunction.proto */
1329 #define __Pyx_CyFunction_USED 1
1330 #include <structmember.h>
1331 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
1332 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
1333 #define __Pyx_CYFUNCTION_CCLASS 0x04
1334 #define __Pyx_CyFunction_GetClosure(f)\
1335  (((__pyx_CyFunctionObject *) (f))->func_closure)
1336 #define __Pyx_CyFunction_GetClassObj(f)\
1337  (((__pyx_CyFunctionObject *) (f))->func_classobj)
1338 #define __Pyx_CyFunction_Defaults(type, f)\
1339  ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
1340 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
1341  ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
1342 typedef struct {
1343  PyCFunctionObject func;
1344 #if PY_VERSION_HEX < 0x030500A0
1345  PyObject *func_weakreflist;
1346 #endif
1347  PyObject *func_dict;
1348  PyObject *func_name;
1349  PyObject *func_qualname;
1350  PyObject *func_doc;
1351  PyObject *func_globals;
1352  PyObject *func_code;
1353  PyObject *func_closure;
1354  PyObject *func_classobj;
1355  void *defaults;
1356  int defaults_pyobjects;
1357  int flags;
1358  PyObject *defaults_tuple;
1359  PyObject *defaults_kwdict;
1360  PyObject *(*defaults_getter)(PyObject *);
1361  PyObject *func_annotations;
1362 } __pyx_CyFunctionObject;
1363 static PyTypeObject *__pyx_CyFunctionType = 0;
1364 #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
1365  __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
1366 static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
1367  int flags, PyObject* qualname,
1368  PyObject *self,
1369  PyObject *module, PyObject *globals,
1370  PyObject* code);
1371 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
1372  size_t size,
1373  int pyobjects);
1374 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
1375  PyObject *tuple);
1376 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
1377  PyObject *dict);
1378 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
1379  PyObject *dict);
1380 static int __pyx_CyFunction_init(void);
1381 
1382 /* Py3ClassCreate.proto */
1383 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
1384  PyObject *mkw, PyObject *modname, PyObject *doc);
1385 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
1386  PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
1387 
1388 /* CodeObjectCache.proto */
1389 typedef struct {
1390  PyCodeObject* code_object;
1391  int code_line;
1392 } __Pyx_CodeObjectCacheEntry;
1393 struct __Pyx_CodeObjectCache {
1394  int count;
1395  int max_count;
1396  __Pyx_CodeObjectCacheEntry* entries;
1397 };
1398 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1399 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1400 static PyCodeObject *__pyx_find_code_object(int code_line);
1401 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1402 
1403 /* AddTraceback.proto */
1404 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1405  int py_line, const char *filename);
1406 
1407 /* CIntToPy.proto */
1408 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1409 
1410 /* RealImag.proto */
1411 #if CYTHON_CCOMPLEX
1412  #ifdef __cplusplus
1413  #define __Pyx_CREAL(z) ((z).real())
1414  #define __Pyx_CIMAG(z) ((z).imag())
1415  #else
1416  #define __Pyx_CREAL(z) (__real__(z))
1417  #define __Pyx_CIMAG(z) (__imag__(z))
1418  #endif
1419 #else
1420  #define __Pyx_CREAL(z) ((z).real)
1421  #define __Pyx_CIMAG(z) ((z).imag)
1422 #endif
1423 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
1424  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
1425  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
1426  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
1427 #else
1428  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
1429  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
1430 #endif
1431 
1432 /* Arithmetic.proto */
1433 #if CYTHON_CCOMPLEX
1434  #define __Pyx_c_eq_float(a, b) ((a)==(b))
1435  #define __Pyx_c_sum_float(a, b) ((a)+(b))
1436  #define __Pyx_c_diff_float(a, b) ((a)-(b))
1437  #define __Pyx_c_prod_float(a, b) ((a)*(b))
1438  #define __Pyx_c_quot_float(a, b) ((a)/(b))
1439  #define __Pyx_c_neg_float(a) (-(a))
1440  #ifdef __cplusplus
1441  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
1442  #define __Pyx_c_conj_float(z) (::std::conj(z))
1443  #if 1
1444  #define __Pyx_c_abs_float(z) (::std::abs(z))
1445  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
1446  #endif
1447  #else
1448  #define __Pyx_c_is_zero_float(z) ((z)==0)
1449  #define __Pyx_c_conj_float(z) (conjf(z))
1450  #if 1
1451  #define __Pyx_c_abs_float(z) (cabsf(z))
1452  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
1453  #endif
1454  #endif
1455 #else
1456  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
1457  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
1458  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
1459  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
1460  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
1461  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
1462  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
1463  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
1464  #if 1
1465  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
1466  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
1467  #endif
1468 #endif
1469 
1470 /* Arithmetic.proto */
1471 #if CYTHON_CCOMPLEX
1472  #define __Pyx_c_eq_double(a, b) ((a)==(b))
1473  #define __Pyx_c_sum_double(a, b) ((a)+(b))
1474  #define __Pyx_c_diff_double(a, b) ((a)-(b))
1475  #define __Pyx_c_prod_double(a, b) ((a)*(b))
1476  #define __Pyx_c_quot_double(a, b) ((a)/(b))
1477  #define __Pyx_c_neg_double(a) (-(a))
1478  #ifdef __cplusplus
1479  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
1480  #define __Pyx_c_conj_double(z) (::std::conj(z))
1481  #if 1
1482  #define __Pyx_c_abs_double(z) (::std::abs(z))
1483  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
1484  #endif
1485  #else
1486  #define __Pyx_c_is_zero_double(z) ((z)==0)
1487  #define __Pyx_c_conj_double(z) (conj(z))
1488  #if 1
1489  #define __Pyx_c_abs_double(z) (cabs(z))
1490  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
1491  #endif
1492  #endif
1493 #else
1494  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
1495  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
1496  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
1497  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
1498  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
1499  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
1500  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
1501  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
1502  #if 1
1503  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
1504  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
1505  #endif
1506 #endif
1507 
1508 /* CIntToPy.proto */
1509 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1510 
1511 /* CIntToPy.proto */
1512 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
1513 
1514 /* CIntFromPy.proto */
1515 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1516 
1517 /* CIntFromPy.proto */
1518 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1519 
1520 /* CheckBinaryVersion.proto */
1521 static int __Pyx_check_binary_version(void);
1522 
1523 /* PyIdentifierFromString.proto */
1524 #if !defined(__Pyx_PyIdentifier_FromString)
1525 #if PY_MAJOR_VERSION < 3
1526  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
1527 #else
1528  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
1529 #endif
1530 #endif
1531 
1532 /* ModuleImport.proto */
1533 static PyObject *__Pyx_ImportModule(const char *name);
1534 
1535 /* TypeImport.proto */
1536 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
1537 
1538 /* InitStrings.proto */
1539 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1540 
1541 
1542 /* Module declarations from 'cpython.buffer' */
1543 
1544 /* Module declarations from 'libc.string' */
1545 
1546 /* Module declarations from 'libc.stdio' */
1547 
1548 /* Module declarations from '__builtin__' */
1549 
1550 /* Module declarations from 'cpython.type' */
1551 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
1552 
1553 /* Module declarations from 'cpython' */
1554 
1555 /* Module declarations from 'cpython.object' */
1556 
1557 /* Module declarations from 'cpython.ref' */
1558 
1559 /* Module declarations from 'libc.stdlib' */
1560 
1561 /* Module declarations from 'numpy' */
1562 
1563 /* Module declarations from 'numpy' */
1564 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
1565 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
1566 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
1567 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
1568 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
1569 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
1570 
1571 /* Module declarations from 'ADR' */
1572 static PyTypeObject *__pyx_ptype_3ADR_ADR = 0;
1573 #define __Pyx_MODULE_NAME "ADR"
1574 int __pyx_module_is_main_ADR = 0;
1575 
1576 /* Implementation of 'ADR' */
1577 static PyObject *__pyx_builtin_range;
1578 static PyObject *__pyx_builtin_sum;
1579 static PyObject *__pyx_builtin_enumerate;
1580 static PyObject *__pyx_builtin_ValueError;
1581 static PyObject *__pyx_builtin_RuntimeError;
1582 static PyObject *__pyx_builtin_ImportError;
1583 static const char __pyx_k_I[] = "I";
1584 static const char __pyx_k_a[] = "a";
1585 static const char __pyx_k_c[] = "c";
1586 static const char __pyx_k_d[] = "d";
1587 static const char __pyx_k_g[] = "g";
1588 static const char __pyx_k_i[] = "i";
1589 static const char __pyx_k_k[] = "k";
1590 static const char __pyx_k_m[] = "m";
1591 static const char __pyx_k_n[] = "n";
1592 static const char __pyx_k_q[] = "q";
1593 static const char __pyx_k_r[] = "r";
1594 static const char __pyx_k_t[] = "t";
1595 static const char __pyx_k_u[] = "u";
1596 static const char __pyx_k_x[] = "x";
1597 static const char __pyx_k_ci[] = "ci";
1598 static const char __pyx_k_cj[] = "cj";
1599 static const char __pyx_k_ck[] = "ck";
1600 static const char __pyx_k_cq[] = "cq";
1601 static const char __pyx_k_dc[] = "dc";
1602 static const char __pyx_k_df[] = "df";
1603 static const char __pyx_k_nI[] = "nI";
1604 static const char __pyx_k_nc[] = "nc";
1605 static const char __pyx_k_nd[] = "nd";
1606 static const char __pyx_k_sd[] = "sd";
1607 static const char __pyx_k_ua[] = "ua";
1608 static const char __pyx_k_vt[] = "vt";
1609 static const char __pyx_k_ADR[] = "ADR";
1610 static const char __pyx_k_adr[] = "adr";
1611 static const char __pyx_k_cfl[] = "cfl";
1612 static const char __pyx_k_dim[] = "dim";
1613 static const char __pyx_k_doc[] = "__doc__";
1614 static const char __pyx_k_dof[] = "dof";
1615 static const char __pyx_k_ebN[] = "ebN";
1616 static const char __pyx_k_ebq[] = "ebq";
1617 static const char __pyx_k_get[] = "get";
1618 static const char __pyx_k_l2g[] = "l2g";
1619 static const char __pyx_k_lag[] = "lag";
1620 static const char __pyx_k_log[] = "log";
1621 static const char __pyx_k_max[] = "max";
1622 static const char __pyx_k_pdb[] = "pdb";
1623 static const char __pyx_k_phi[] = "phi";
1624 static const char __pyx_k_psi[] = "psi";
1625 static const char __pyx_k_q_a[] = "q_a";
1626 static const char __pyx_k_q_r[] = "q_r";
1627 static const char __pyx_k_q_v[] = "q_v";
1628 static const char __pyx_k_row[] = "row";
1629 static const char __pyx_k_sum[] = "sum";
1630 static const char __pyx_k_u_j[] = "u_j";
1631 static const char __pyx_k_Comm[] = "Comm";
1632 static const char __pyx_k_Hess[] = "Hess";
1633 static const char __pyx_k_aOfX[] = "aOfX";
1634 static const char __pyx_k_cebq[] = "cebq";
1635 static const char __pyx_k_comm[] = "comm";
1636 static const char __pyx_k_copy[] = "copy";
1637 static const char __pyx_k_data[] = "data";
1638 static const char __pyx_k_dphi[] = "dphi";
1639 static const char __pyx_k_ebNE[] = "ebNE";
1640 static const char __pyx_k_ebqe[] = "ebqe";
1641 static const char __pyx_k_fOfX[] = "fOfX";
1642 static const char __pyx_k_fabs[] = "fabs";
1643 static const char __pyx_k_fill[] = "fill";
1644 static const char __pyx_k_flag[] = "flag";
1645 static const char __pyx_k_flat[] = "flat";
1646 static const char __pyx_k_init[] = "__init__";
1647 static const char __pyx_k_keys[] = "keys";
1648 static const char __pyx_k_main[] = "__main__";
1649 static const char __pyx_k_mass[] = "mass";
1650 static const char __pyx_k_math[] = "math";
1651 static const char __pyx_k_mesh[] = "mesh";
1652 static const char __pyx_k_name[] = "name";
1653 static const char __pyx_k_self[] = "self";
1654 static const char __pyx_k_size[] = "size";
1655 static const char __pyx_k_stab[] = "stab";
1656 static const char __pyx_k_step[] = "step";
1657 static const char __pyx_k_stop[] = "stop";
1658 static const char __pyx_k_test[] = "__test__";
1659 static const char __pyx_k_array[] = "array";
1660 static const char __pyx_k_cebqe[] = "cebqe";
1661 static const char __pyx_k_class[] = "__class__";
1662 static const char __pyx_k_dtype[] = "dtype";
1663 static const char __pyx_k_level[] = "level";
1664 static const char __pyx_k_numpy[] = "numpy";
1665 static const char __pyx_k_phi_k[] = "phi_k";
1666 static const char __pyx_k_range[] = "range";
1667 static const char __pyx_k_shape[] = "shape";
1668 static const char __pyx_k_start[] = "start";
1669 static const char __pyx_k_uDict[] = "uDict";
1670 static const char __pyx_k_u_dof[] = "u_dof";
1671 static const char __pyx_k_u_l2g[] = "u_l2g";
1672 static const char __pyx_k_zeros[] = "zeros";
1673 static const char __pyx_k_CT_sge[] = "CT_sge";
1674 static const char __pyx_k_append[] = "append";
1675 static const char __pyx_k_arange[] = "arange";
1676 static const char __pyx_k_dS_ref[] = "dS_ref";
1677 static const char __pyx_k_dV_ref[] = "dV_ref";
1678 static const char __pyx_k_dofMap[] = "dofMap";
1679 static const char __pyx_k_ebqe_a[] = "ebqe_a";
1680 static const char __pyx_k_ebqe_v[] = "ebqe_v";
1681 static const char __pyx_k_grad_u[] = "grad(u)";
1682 static const char __pyx_k_import[] = "__import__";
1683 static const char __pyx_k_l2proj[] = "l2proj";
1684 static const char __pyx_k_linear[] = "linear";
1685 static const char __pyx_k_lowmem[] = "lowmem";
1686 static const char __pyx_k_memory[] = "memory";
1687 static const char __pyx_k_module[] = "__module__";
1688 static const char __pyx_k_nCalls[] = "nCalls";
1689 static const char __pyx_k_nSteps[] = "nSteps";
1690 static const char __pyx_k_name_2[] = "__name__";
1691 static const char __pyx_k_offset[] = "offset";
1692 static const char __pyx_k_phi_ip[] = "phi_ip";
1693 static const char __pyx_k_sdInfo[] = "sdInfo";
1694 static const char __pyx_k_stride[] = "stride";
1695 static const char __pyx_k_values[] = "values";
1696 static const char __pyx_k_TC_base[] = "TC_base";
1697 static const char __pyx_k_default[] = "default";
1698 static const char __pyx_k_has_key[] = "has_key";
1699 static const char __pyx_k_matType[] = "matType";
1700 static const char __pyx_k_numDiff[] = "numDiff";
1701 static const char __pyx_k_options[] = "options";
1702 static const char __pyx_k_outFlow[] = "outFlow";
1703 static const char __pyx_k_penalty[] = "penalty";
1704 static const char __pyx_k_phiDict[] = "phiDict";
1705 static const char __pyx_k_prepare[] = "__prepare__";
1706 static const char __pyx_k_proteus[] = "proteus";
1707 static const char __pyx_k_sc_beta[] = "sc_beta";
1708 static const char __pyx_k_sc_uref[] = "sc_uref";
1709 static const char __pyx_k_setFlow[] = "setFlow";
1710 static const char __pyx_k_Archiver[] = "Archiver";
1711 static const char __pyx_k_Jacobian[] = "Jacobian ";
1712 static const char __pyx_k_SGE_base[] = "SGE_base";
1713 static const char __pyx_k_constant[] = "constant";
1714 static const char __pyx_k_evaluate[] = "evaluate";
1715 static const char __pyx_k_femSpace[] = "femSpace";
1716 static const char __pyx_k_grad_psi[] = "grad_psi";
1717 static const char __pyx_k_jacobian[] = "jacobian";
1718 static const char __pyx_k_logEvent[] = "logEvent";
1719 static const char __pyx_k_mesh_dof[] = "mesh_dof";
1720 static const char __pyx_k_mesh_l2g[] = "mesh_l2g";
1721 static const char __pyx_k_nSpaceIn[] = "nSpaceIn";
1722 static const char __pyx_k_offset_u[] = "offset_u";
1723 static const char __pyx_k_qualname[] = "__qualname__";
1724 static const char __pyx_k_reaction[] = "reaction";
1725 static const char __pyx_k_sc_alpha[] = "sc_alpha";
1726 static const char __pyx_k_stride_u[] = "stride_u";
1727 static const char __pyx_k_timeTerm[] = "timeTerm";
1728 static const char __pyx_k_velocity[] = "velocity";
1729 static const char __pyx_k_Transport[] = "Transport";
1730 static const char __pyx_k_advection[] = "advection";
1731 static const char __pyx_k_diffusion[] = "diffusion";
1732 static const char __pyx_k_eN_global[] = "eN_global";
1733 static const char __pyx_k_enumerate[] = "enumerate";
1734 static const char __pyx_k_fbcObject[] = "fbcObject";
1735 static const char __pyx_k_getValues[] = "getValues";
1736 static const char __pyx_k_globalMax[] = "globalMax";
1737 static const char __pyx_k_globalSum[] = "globalSum";
1738 static const char __pyx_k_iteritems[] = "iteritems";
1739 static const char __pyx_k_metaclass[] = "__metaclass__";
1740 static const char __pyx_k_mixedFlow[] = "mixedFlow";
1741 static const char __pyx_k_nodeArray[] = "nodeArray";
1742 static const char __pyx_k_nonlinear[] = "nonlinear";
1743 static const char __pyx_k_potential[] = "potential";
1744 static const char __pyx_k_psi_trace[] = "psi_trace";
1745 static const char __pyx_k_testSpace[] = "testSpace";
1746 static const char __pyx_k_LevelModel[] = "LevelModel";
1747 static const char __pyx_k_Quadrature[] = "Quadrature";
1748 static const char __pyx_k_ValueError[] = "ValueError";
1749 static const char __pyx_k_XdmfWriter[] = "XdmfWriter";
1750 static const char __pyx_k_buildUnion[] = "buildUnion";
1751 static const char __pyx_k_components[] = "components";
1752 static const char __pyx_k_ebq_global[] = "ebq_global";
1753 static const char __pyx_k_inflowFlux[] = "inflowFlux";
1754 static const char __pyx_k_normal_ref[] = "normal_ref";
1755 static const char __pyx_k_tLast_mesh[] = "tLast_mesh";
1756 static const char __pyx_k_u_test_ref[] = "u_test_ref";
1757 static const char __pyx_k_useMetrics[] = "useMetrics";
1758 static const char __pyx_k_ImportError[] = "ImportError";
1759 static const char __pyx_k_cebq_global[] = "cebq_global";
1760 static const char __pyx_k_defaultName[] = "defaultName";
1761 static const char __pyx_k_ebN_element[] = "ebN_element";
1762 static const char __pyx_k_elementMaps[] = "elementMaps";
1763 static const char __pyx_k_estimate_mt[] = "estimate_mt";
1764 static const char __pyx_k_getJacobian[] = "getJacobian";
1765 static const char __pyx_k_getResidual[] = "getResidual";
1766 static const char __pyx_k_hamiltonian[] = "hamiltonian";
1767 static const char __pyx_k_massLumping[] = "massLumping";
1768 static const char __pyx_k_q_numDiff_u[] = "q_numDiff_u";
1769 static const char __pyx_k_setUnknowns[] = "setUnknowns";
1770 static const char __pyx_k_testIsTrial[] = "testIsTrial";
1771 static const char __pyx_k_u_trial_ref[] = "u_trial_ref";
1772 static const char __pyx_k_Coefficients[] = "Coefficients";
1773 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1774 static const char __pyx_k_SubgridError[] = "SubgridError";
1775 static const char __pyx_k_coefficients[] = "coefficients";
1776 static const char __pyx_k_ebqe_penalty[] = "ebqe_penalty";
1777 static const char __pyx_k_movingDomain[] = "movingDomain";
1778 static const char __pyx_k_numDiff_last[] = "numDiff_last";
1779 static const char __pyx_k_MOVING_DOMAIN[] = "MOVING_DOMAIN";
1780 static const char __pyx_k_NumericalFlux[] = "NumericalFlux";
1781 static const char __pyx_k_adjoint_sigma[] = "adjoint_sigma";
1782 static const char __pyx_k_cfemIntegrals[] = "cfemIntegrals";
1783 static const char __pyx_k_csrRowIndeces[] = "csrRowIndeces";
1784 static const char __pyx_k_diffusionDict[] = "diffusionDict";
1785 static const char __pyx_k_ebqe_bc_u_ext[] = "ebqe_bc_u_ext";
1786 static const char __pyx_k_internalNodes[] = "internalNodes";
1787 static const char __pyx_k_isDOFBoundary[] = "isDOFBoundary";
1788 static const char __pyx_k_nNodes_global[] = "nNodes_global";
1789 static const char __pyx_k_nSpace_global[] = "nSpace_global";
1790 static const char __pyx_k_nStepsToDelay[] = "nStepsToDelay";
1791 static const char __pyx_k_nVDOF_element[] = "nVDOF_element";
1792 static const char __pyx_k_numericalFlux[] = "numericalFlux";
1793 static const char __pyx_k_penalty_power[] = "penalty_power";
1794 static const char __pyx_k_stabilization[] = "stabilization";
1795 static const char __pyx_k_stride_offset[] = "stride+offset";
1796 static const char __pyx_k_testSpaceDict[] = "testSpaceDict";
1797 static const char __pyx_k_variableNames[] = "variableNames";
1798 static const char __pyx_k_CompKernelFlag[] = "CompKernelFlag";
1799 static const char __pyx_k_ShockCapturing[] = "ShockCapturing";
1800 static const char __pyx_k_compKernelFlag[] = "compKernelFlag";
1801 static const char __pyx_k_elemQuadIsDict[] = "elemQuadIsDict";
1802 static const char __pyx_k_globalJacobian[] = "globalJacobian";
1803 static const char __pyx_k_globalResidual[] = "globalResidual";
1804 static const char __pyx_k_grad_psi_trace[] = "grad_psi_trace";
1805 static const char __pyx_k_initializeMesh[] = "initializeMesh";
1806 static const char __pyx_k_mesh_trial_ref[] = "mesh_trial_ref";
1807 static const char __pyx_k_nNodes_element[] = "nNodes_element";
1808 static const char __pyx_k_setFromOptions[] = "setFromOptions";
1809 static const char __pyx_k_shockCapturing[] = "shockCapturing";
1810 static const char __pyx_k_Global_residual[] = "Global residual";
1811 static const char __pyx_k_TimeIntegration[] = "TimeIntegration";
1812 static const char __pyx_k_boundaryJac_ref[] = "boundaryJac_ref";
1813 static const char __pyx_k_boundaryNormals[] = "boundaryNormals";
1814 static const char __pyx_k_elementDiameter[] = "elementDiameter";
1815 static const char __pyx_k_isDOFBoundary_u[] = "isDOFBoundary_u";
1816 static const char __pyx_k_nElements_owned[] = "nElements_owned";
1817 static const char __pyx_k_nFreeDOF_global[] = "nFreeDOF_global";
1818 static const char __pyx_k_nNodes_internal[] = "nNodes_internal";
1819 static const char __pyx_k_phiTrialIsTrial[] = "phiTrialIsTrial";
1820 static const char __pyx_k_reactionLumping[] = "reactionLumping";
1821 static const char __pyx_k_timeIntegration[] = "timeIntegration";
1822 static const char __pyx_k_u_grad_test_ref[] = "u_grad_test_ref";
1823 static const char __pyx_k_advectiveFlux_bc[] = "advectiveFlux_bc";
1824 static const char __pyx_k_conservativeFlux[] = "conservativeFlux";
1825 static const char __pyx_k_csrColumnOffsets[] = "csrColumnOffsets";
1826 static const char __pyx_k_diffusiveFlux_bc[] = "diffusiveFlux_bc";
1827 static const char __pyx_k_inflowBoundaryBC[] = "inflowBoundaryBC";
1828 static const char __pyx_k_isFluxBoundary_u[] = "isFluxBoundary_u";
1829 static const char __pyx_k_max_nDOF_element[] = "max_nDOF_element";
1830 static const char __pyx_k_nElements_global[] = "nElements_global";
1831 static const char __pyx_k_nFreeVDOF_global[] = "nFreeVDOF_global";
1832 static const char __pyx_k_n_phi_ip_element[] = "n_phi_ip_element";
1833 static const char __pyx_k_penalty_constant[] = "penalty_constant";
1834 static const char __pyx_k_proteus_FemTools[] = "proteus.FemTools";
1835 static const char __pyx_k_q_numDiff_u_last[] = "q_numDiff_u_last";
1836 static const char __pyx_k_u_grad_trial_ref[] = "u_grad_trial_ref";
1837 static const char __pyx_k_u_test_trace_ref[] = "u_test_trace_ref";
1838 static const char __pyx_k_zeroJacobian_CSR[] = "zeroJacobian_CSR";
1839 static const char __pyx_k_L2projectEvaluate[] = "L2projectEvaluate";
1840 static const char __pyx_k_LevelModel___init[] = "LevelModel.__init__";
1841 static const char __pyx_k_NonlinearEquation[] = "NonlinearEquation";
1842 static const char __pyx_k_OneLevelTransport[] = "OneLevelTransport";
1843 static const char __pyx_k_VOF_max_numDiff_e[] = "VOF: max numDiff %e";
1844 static const char __pyx_k_boundaryJacobians[] = "boundaryJacobians";
1845 static const char __pyx_k_calculateJacobian[] = "calculateJacobian";
1846 static const char __pyx_k_calculateResidual[] = "calculateResidual";
1847 static const char __pyx_k_csrRowIndeces_u_u[] = "csrRowIndeces_u_u";
1848 static const char __pyx_k_elementNodesArray[] = "elementNodesArray";
1849 static const char __pyx_k_elementQuadrature[] = "elementQuadrature";
1850 static const char __pyx_k_getBasisValuesRef[] = "getBasisValuesRef";
1851 static const char __pyx_k_nDOF_test_element[] = "nDOF_test_element";
1852 static const char __pyx_k_nQuadraturePoints[] = "nQuadraturePoints";
1853 static const char __pyx_k_nodeVelocityArray[] = "nodeVelocityArray";
1854 static const char __pyx_k_numericalFluxType[] = "numericalFluxType";
1855 static const char __pyx_k_proteus_Profiling[] = "proteus.Profiling";
1856 static const char __pyx_k_proteus_Transport[] = "proteus.Transport";
1857 static const char __pyx_k_sdInfo_u_u_colind[] = "sdInfo_u_u_colind";
1858 static const char __pyx_k_sdInfo_u_u_rowptr[] = "sdInfo_u_u_rowptr";
1859 static const char __pyx_k_setupFieldStrides[] = "setupFieldStrides";
1860 static const char __pyx_k_u_trial_trace_ref[] = "u_trial_trace_ref";
1861 static const char __pyx_k_NumericalFlux_IIPG[] = "NumericalFlux_IIPG";
1862 static const char __pyx_k_NumericalFlux_NIPG[] = "NumericalFlux_NIPG";
1863 static const char __pyx_k_NumericalFlux_SIPG[] = "NumericalFlux_SIPG";
1864 static const char __pyx_k_ebqe_bc_flux_u_ext[] = "ebqe_bc_flux_u_ext";
1865 static const char __pyx_k_internalNodesArray[] = "internalNodesArray";
1866 static const char __pyx_k_lag_shockCapturing[] = "lag_shockCapturing";
1867 static const char __pyx_k_localFunctionSpace[] = "localFunctionSpace";
1868 static const char __pyx_k_nDOF_trial_element[] = "nDOF_trial_element";
1869 static const char __pyx_k_setDirichletValues[] = "setDirichletValues";
1870 static const char __pyx_k_updateLocal2Global[] = "updateLocal2Global";
1871 static const char __pyx_k_useSparseDiffusion[] = "useSparseDiffusion";
1872 static const char __pyx_k_Coefficients___init[] = "Coefficients.__init__";
1873 static const char __pyx_k_PostProcessingTools[] = "PostProcessingTools";
1874 static const char __pyx_k_ShockCapturing_base[] = "ShockCapturing_base";
1875 static const char __pyx_k_SubgridError___init[] = "SubgridError.__init__";
1876 static const char __pyx_k_calculateQuadrature[] = "calculateQuadrature";
1877 static const char __pyx_k_csrColumnOffsets_eb[] = "csrColumnOffsets_eb";
1878 static const char __pyx_k_dirichletConditions[] = "dirichletConditions";
1879 static const char __pyx_k_elementIntegralKeys[] = "elementIntegralKeys";
1880 static const char __pyx_k_initializationPhase[] = "initializationPhase";
1881 static const char __pyx_k_mesh_grad_trial_ref[] = "mesh_grad_trial_ref";
1882 static const char __pyx_k_nDOF_test_elementIn[] = "nDOF_test_elementIn";
1883 static const char __pyx_k_nNonzerosInJacobian[] = "nNonzerosInJacobian";
1884 static const char __pyx_k_TimeIntegrationClass[] = "TimeIntegrationClass";
1885 static const char __pyx_k_conservativeFluxDict[] = "conservativeFluxDict";
1886 static const char __pyx_k_csrColumnOffsets_u_u[] = "csrColumnOffsets_u_u";
1887 static const char __pyx_k_dirichletNodeSetList[] = "dirichletNodeSetList";
1888 static const char __pyx_k_forceStrongDirichlet[] = "forceStrongDirichlet";
1889 static const char __pyx_k_getCSRrepresentation[] = "getCSRrepresentation";
1890 static const char __pyx_k_mesh_trial_trace_ref[] = "mesh_trial_trace_ref";
1891 static const char __pyx_k_nDOF_trial_elementIn[] = "nDOF_trial_elementIn";
1892 static const char __pyx_k_proteus_SubgridError[] = "proteus.SubgridError";
1893 static const char __pyx_k_shockCapturingFactor[] = "shockCapturingFactor";
1894 static const char __pyx_k_Coefficients_evaluate[] = "Coefficients.evaluate";
1895 static const char __pyx_k_DOFBoundaryConditions[] = "DOFBoundaryConditions";
1896 static const char __pyx_k_ShockCapturing___init[] = "ShockCapturing.__init__";
1897 static const char __pyx_k_advectiveFlux_bc_flag[] = "advectiveFlux_bc_flag";
1898 static const char __pyx_k_boundaryAdjoint_sigma[] = "boundaryAdjoint_sigma";
1899 static const char __pyx_k_calculateCoefficients[] = "calculateCoefficients";
1900 static const char __pyx_k_calculateSubgridError[] = "calculateSubgridError";
1901 static const char __pyx_k_diffusiveFlux_bc_flag[] = "diffusiveFlux_bc_flag";
1902 static const char __pyx_k_elementDiametersArray[] = "elementDiametersArray";
1903 static const char __pyx_k_elementQuadratureDict[] = "elementQuadratureDict";
1904 static const char __pyx_k_forceStrongConditions[] = "forceStrongConditions";
1905 static const char __pyx_k_massConservationError[] = "massConservationError";
1906 static const char __pyx_k_u_grad_test_trace_ref[] = "u_grad_test_trace_ref";
1907 static const char __pyx_k_velocityPostProcessor[] = "velocityPostProcessor";
1908 static const char __pyx_k_FluxBoundaryConditions[] = "FluxBoundaryConditions";
1909 static const char __pyx_k_LevelModel_estimate_mt[] = "LevelModel.estimate_mt";
1910 static const char __pyx_k_LevelModel_getJacobian[] = "LevelModel.getJacobian";
1911 static const char __pyx_k_LevelModel_getResidual[] = "LevelModel.getResidual";
1912 static const char __pyx_k_fluxBoundaryConditions[] = "fluxBoundaryConditions";
1913 static const char __pyx_k_getBasisValuesTraceRef[] = "getBasisValuesTraceRef";
1914 static const char __pyx_k_nDOF_phi_trial_element[] = "nDOF_phi_trial_element";
1915 static const char __pyx_k_proteus_ShockCapturing[] = "proteus.ShockCapturing";
1916 static const char __pyx_k_proteus_flcbdfWrappers[] = "proteus.flcbdfWrappers";
1917 static const char __pyx_k_referenceFiniteElement[] = "referenceFiniteElement";
1918 static const char __pyx_k_sparseDiffusionTensors[] = "sparseDiffusionTensors";
1919 static const char __pyx_k_u_grad_trial_trace_ref[] = "u_grad_trial_trace_ref";
1920 static const char __pyx_k_velocity_postprocessor[] = "velocity postprocessor";
1921 static const char __pyx_k_Mass_Conservation_Error[] = " Mass Conservation Error";
1922 static const char __pyx_k_csrColumnOffsets_eb_u_u[] = "csrColumnOffsets_eb_u_u";
1923 static const char __pyx_k_elementQuadraturePoints[] = "elementQuadraturePoints";
1924 static const char __pyx_k_inflowBoundaryBC_values[] = "inflowBoundaryBC_values";
1925 static const char __pyx_k_interpolationConditions[] = "interpolationConditions";
1926 static const char __pyx_k_shockCapturingDiffusion[] = "shockCapturingDiffusion";
1927 static const char __pyx_k_timeVaryingCoefficients[] = "timeVaryingCoefficients";
1928 static const char __pyx_k_weakDirichletConditions[] = "weakDirichletConditions";
1929 static const char __pyx_k_SimplexLobattoQuadrature[] = "SimplexLobattoQuadrature";
1930 static const char __pyx_k_elementBoundaryIntegrals[] = "elementBoundaryIntegrals";
1931 static const char __pyx_k_elementQuadratureWeights[] = "elementQuadratureWeights";
1932 static const char __pyx_k_nQuadraturePoints_global[] = "nQuadraturePoints_global";
1933 static const char __pyx_k_proteus_NonlinearSolvers[] = "proteus.NonlinearSolvers";
1934 static const char __pyx_k_stabilizationIsNonlinear[] = "stabilizationIsNonlinear";
1935 static const char __pyx_k_NumericalFlux_IIPG___init[] = "NumericalFlux_IIPG.__init__";
1936 static const char __pyx_k_NumericalFlux_NIPG___init[] = "NumericalFlux_NIPG.__init__";
1937 static const char __pyx_k_NumericalFlux_SIPG___init[] = "NumericalFlux_SIPG.__init__";
1938 static const char __pyx_k_dofBoundaryConditionsDict[] = "dofBoundaryConditionsDict";
1939 static const char __pyx_k_elementBoundaryQuadrature[] = "elementBoundaryQuadrature";
1940 static const char __pyx_k_getBasisGradientValuesRef[] = "getBasisGradientValuesRef";
1941 static const char __pyx_k_initializeTimeIntegration[] = "initializeTimeIntegration";
1942 static const char __pyx_k_isAdvectiveFluxBoundary_u[] = "isAdvectiveFluxBoundary_u";
1943 static const char __pyx_k_mesh_grad_trial_trace_ref[] = "mesh_grad_trial_trace_ref";
1944 static const char __pyx_k_nDOF_mesh_trial_elementIn[] = "nDOF_mesh_trial_elementIn";
1945 static const char __pyx_k_nElementBoundaries_global[] = "nElementBoundaries_global";
1946 static const char __pyx_k_nQuadraturePoints_element[] = "nQuadraturePoints_element";
1947 static const char __pyx_k_updateSubgridErrorHistory[] = "updateSubgridErrorHistory";
1948 static const char __pyx_k_usesGradientStabilization[] = "usesGradientStabilization";
1949 static const char __pyx_k_calculateElementQuadrature[] = "calculateElementQuadrature";
1950 static const char __pyx_k_elementInnerDiametersArray[] = "elementInnerDiametersArray";
1951 static const char __pyx_k_fluxBoundaryConditionsDict[] = "fluxBoundaryConditionsDict";
1952 static const char __pyx_k_nElementBoundaries_element[] = "nElementBoundaries_element";
1953 static const char __pyx_k_useWeakDirichletConditions[] = "useWeakDirichletConditions";
1954 static const char __pyx_k_dirichletConditionsForceDOF[] = "dirichletConditionsForceDOF";
1955 static const char __pyx_k_ebqe_bc_advectiveFlux_u_ext[] = "ebqe_bc_advectiveFlux_u_ext";
1956 static const char __pyx_k_elementBoundaryIntegralKeys[] = "elementBoundaryIntegralKeys";
1957 static const char __pyx_k_initializeElementQuadrature[] = "initializeElementQuadrature";
1958 static const char __pyx_k_nQuadraturePoints_elementIn[] = "nQuadraturePoints_elementIn";
1959 static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
1960 static const char __pyx_k_periodicDirichletConditions[] = "periodicDirichletConditions";
1961 static const char __pyx_k_reuse_test_trial_quadrature[] = "reuse_test_trial_quadrature";
1962 static const char __pyx_k_updateShockCapturingHistory[] = "updateShockCapturingHistory";
1963 static const char __pyx_k_elementBoundaryElementsArray[] = "elementBoundaryElementsArray";
1964 static const char __pyx_k_elementQuadratureRuleIndeces[] = "elementQuadratureRuleIndeces";
1965 static const char __pyx_k_getValuesGlobalExteriorTrace[] = "getValuesGlobalExteriorTrace";
1966 static const char __pyx_k_integrateInterpolationPoints[] = "integrateInterpolationPoints";
1967 static const char __pyx_k_VelocityPostProcessingChooser[] = "VelocityPostProcessingChooser";
1968 static const char __pyx_k_calculateSolutionAtQuadrature[] = "calculateSolutionAtQuadrature";
1969 static const char __pyx_k_elementBoundaryDiametersArray[] = "elementBoundaryDiametersArray";
1970 static const char __pyx_k_elementBoundaryQuadratureDict[] = "elementBoundaryQuadratureDict";
1971 static const char __pyx_k_proteus_TransportCoefficients[] = "proteus.TransportCoefficients";
1972 static const char __pyx_k_Residual_based_shock_capturing[] = "\n Residual-based shock capturing for ADR equations\n\n .. inheritance-diagram:: ShockCapturing\n :parts: 2\n ";
1973 static const char __pyx_k_SubgridError_approximation_for[] = "\n SubgridError approximation for ADR equations\n\n .. inheritance-diagram:: SubgridError\n :parts: 2\n ";
1974 static const char __pyx_k_elementEffectiveDiametersArray[] = "elementEffectiveDiametersArray";
1975 static const char __pyx_k_exteriorElementBoundariesArray[] = "exteriorElementBoundariesArray";
1976 static const char __pyx_k_getBasisGradientValuesTraceRef[] = "getBasisGradientValuesTraceRef";
1977 static const char __pyx_k_getPointwiseBoundaryConditions[] = "getPointwiseBoundaryConditions";
1978 static const char __pyx_k_nonlinear_function_evaluations[] = "nonlinear_function_evaluations";
1979 static const char __pyx_k_proteus_ctransportCoefficients[] = "proteus.ctransportCoefficients";
1980 static const char __pyx_k_An_optimized_Advection_Diffusio[] = "\nAn optimized Advection-Diffusion-Reaction module\n";
1981 static const char __pyx_k_Coefficients_of_linear_ADR_equa[] = "\n Coefficients of linear ADR equations\n\n .. inheritance-diagram:: Coefficients\n :parts: 2\n ";
1982 static const char __pyx_k_Optimized_LevelModel_for_ADR_eq[] = "\n Optimized LevelModel for ADR equations\n\n .. inheritance-diagram:: LevelModel\n :parts: 2\n ";
1983 static const char __pyx_k_dofBoundaryConditionsSetterDict[] = "dofBoundaryConditionsSetterDict";
1984 static const char __pyx_k_elementBoundaryQuadraturePoints[] = "elementBoundaryQuadraturePoints";
1985 static const char __pyx_k_home_cekees_proteus_proteus_ADR[] = "/home/cekees/proteus/proteus/ADR.pyx";
1986 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
1987 static const char __pyx_k_reuse_trial_and_test_quadrature[] = "reuse_trial_and_test_quadrature";
1988 static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
1989 static const char __pyx_k_ADR_ShockCapturing_lagging_reque[] = "ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying";
1990 static const char __pyx_k_ADR_ShockCapturing_switched_to_l[] = "ADR.ShockCapturing: switched to lagged shock capturing";
1991 static const char __pyx_k_Advection_DiagonalUpwind_Diffusi[] = "Advection_DiagonalUpwind_Diffusion_IIPG_exterior";
1992 static const char __pyx_k_Building_time_integration_object[] = "Building time integration object";
1993 static const char __pyx_k_C0_AffineLinearOnSimplexWithNoda[] = "C0_AffineLinearOnSimplexWithNodalBasis";
1994 static const char __pyx_k_Calculating_numerical_quadrature[] = "Calculating numerical quadrature formulas";
1995 static const char __pyx_k_Coefficients_initializeElementBo[] = "Coefficients.initializeElementBoundaryQuadrature";
1996 static const char __pyx_k_Coefficients_initializeElementQu[] = "Coefficients.initializeElementQuadrature";
1997 static const char __pyx_k_Coefficients_initializeGlobalExt[] = "Coefficients.initializeGlobalExteriorElementBoundaryQuadrature";
1998 static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
1999 static const char __pyx_k_LevelModel_calculateAuxiliaryQua[] = "LevelModel.calculateAuxiliaryQuantitiesAfterStep";
2000 static const char __pyx_k_LevelModel_calculateCoefficients[] = "LevelModel.calculateCoefficients";
2001 static const char __pyx_k_LevelModel_calculateElementBound[] = "LevelModel.calculateElementBoundaryQuadrature";
2002 static const char __pyx_k_LevelModel_calculateElementQuadr[] = "LevelModel.calculateElementQuadrature";
2003 static const char __pyx_k_LevelModel_calculateExteriorElem[] = "LevelModel.calculateExteriorElementBoundaryQuadrature";
2004 static const char __pyx_k_LevelModel_calculateSolutionAtQu[] = "LevelModel.calculateSolutionAtQuadrature";
2005 static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
2006 static const char __pyx_k_ShockCapturing_initializeElement[] = "ShockCapturing.initializeElementQuadrature";
2007 static const char __pyx_k_ShockCapturing_updateShockCaptur[] = "ShockCapturing.updateShockCapturingHistory";
2008 static const char __pyx_k_SubgridError_calculateSubgridErr[] = "SubgridError.calculateSubgridError";
2009 static const char __pyx_k_SubgridError_initializeElementQu[] = "SubgridError.initializeElementQuadrature";
2010 static const char __pyx_k_SubgridError_updateSubgridErrorH[] = "SubgridError.updateSubgridErrorHistory";
2011 static const char __pyx_k_Updating_local_to_global_mapping[] = "Updating local to global mappings";
2012 static const char __pyx_k_You_must_use_a_numerical_flux_to[] = "You must use a numerical flux to apply weak boundary conditions for parallel runs";
2013 static const char __pyx_k_advectiveFluxBoundaryConditionsD[] = "advectiveFluxBoundaryConditionsDict";
2014 static const char __pyx_k_advectiveFluxBoundaryConditionsS[] = "advectiveFluxBoundaryConditionsSetterDict";
2015 static const char __pyx_k_calculateAuxiliaryQuantitiesAfte[] = "calculateAuxiliaryQuantitiesAfterStep";
2016 static const char __pyx_k_calculateElementBoundaryQuadratu[] = "calculateElementBoundaryQuadrature";
2017 static const char __pyx_k_calculateExteriorElementBoundary[] = "calculateExteriorElementBoundaryQuadrature";
2018 static const char __pyx_k_diffusiveFluxBoundaryConditionsD[] = "diffusiveFluxBoundaryConditionsDictDict";
2019 static const char __pyx_k_diffusiveFluxBoundaryConditionsS[] = "diffusiveFluxBoundaryConditionsSetterDictDict";
2020 static const char __pyx_k_elementBoundaryLocalElementBound[] = "elementBoundaryLocalElementBoundariesArray";
2021 static const char __pyx_k_elementBoundaryQuadratureDiction[] = "elementBoundaryQuadratureDictionaryWriter";
2022 static const char __pyx_k_elementBoundaryQuadratureRuleInd[] = "elementBoundaryQuadratureRuleIndeces";
2023 static const char __pyx_k_elementBoundaryQuadratureWeights[] = "elementBoundaryQuadratureWeights";
2024 static const char __pyx_k_elementQuadratureDictionaryWrite[] = "elementQuadratureDictionaryWriter";
2025 static const char __pyx_k_element_and_element_boundary_Jac[] = "element and element boundary Jacobians";
2026 static const char __pyx_k_exteriorElementBoundaryQuadratur[] = "exteriorElementBoundaryQuadratureDictionaryWriter";
2027 static const char __pyx_k_fluxBoundaryConditionsObjectsDic[] = "fluxBoundaryConditionsObjectsDict";
2028 static const char __pyx_k_getAdvectiveFluxBoundaryConditio[] = "getAdvectiveFluxBoundaryConditions";
2029 static const char __pyx_k_getDiffusiveFluxBoundaryConditio[] = "getDiffusiveFluxBoundaryConditions";
2030 static const char __pyx_k_inflowBC_internalNodes_updateLoc[] = "inflowBC, internalNodes,updateLocal2Global";
2031 static const char __pyx_k_initializeElementBoundaryQuadrat[] = "initializeElementBoundaryQuadrature";
2032 static const char __pyx_k_initializeGlobalExteriorElementB[] = "initializeGlobalExteriorElementBoundaryQuadrature";
2033 static const char __pyx_k_nElementBoundaryQuadraturePoints[] = "nElementBoundaryQuadraturePoints_elementBoundary";
2034 static const char __pyx_k_nExteriorElementBoundaries_globa[] = "nExteriorElementBoundaries_global";
2035 static const char __pyx_k_nQuadraturePoints_elementBoundar[] = "nQuadraturePoints_elementBoundaryIn";
2036 static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
2037 static const char __pyx_k_nonlinear_function_jacobian_eval[] = "nonlinear_function_jacobian_evaluations";
2038 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
2039 static const char __pyx_k_points_elementBoundaryQuadrature[] = "points_elementBoundaryQuadrature";
2040 static const char __pyx_k_scalars_elementBoundaryQuadratur[] = "scalars_elementBoundaryQuadrature";
2041 static const char __pyx_k_stressTraceBoundaryConditionsSet[] = "stressTraceBoundaryConditionsSetterDict";
2042 static const char __pyx_k_tensors_elementBoundaryQuadratur[] = "tensors_elementBoundaryQuadrature";
2043 static const char __pyx_k_to_reuse_test_trial_quad_all_fem[] = "to reuse_test_trial_quad all femSpaces must be the same!";
2044 static const char __pyx_k_vectors_elementBoundaryQuadratur[] = "vectors_elementBoundaryQuadrature";
2045 static const char __pyx_k_Advection_DiagonalUpwind_Diffusi_2[] = "Advection_DiagonalUpwind_Diffusion_SIPG_exterior";
2046 static const char __pyx_k_Advection_DiagonalUpwind_Diffusi_3[] = "Advection_DiagonalUpwind_Diffusion_NIPG_exterior";
2047 static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
2048 static const char __pyx_k_diffusiveFluxBoundaryConditionsD_2[] = "diffusiveFluxBoundaryConditionsDict";
2049 static const char __pyx_k_nElementBoundaryQuadraturePoints_2[] = "nElementBoundaryQuadraturePoints_global";
2050 static PyObject *__pyx_n_s_ADR;
2051 static PyObject *__pyx_kp_s_ADR_ShockCapturing_lagging_reque;
2052 static PyObject *__pyx_kp_s_ADR_ShockCapturing_switched_to_l;
2053 static PyObject *__pyx_n_s_Advection_DiagonalUpwind_Diffusi;
2054 static PyObject *__pyx_n_s_Advection_DiagonalUpwind_Diffusi_2;
2055 static PyObject *__pyx_n_s_Advection_DiagonalUpwind_Diffusi_3;
2056 static PyObject *__pyx_n_s_Archiver;
2057 static PyObject *__pyx_kp_s_Building_time_integration_object;
2058 static PyObject *__pyx_n_s_C0_AffineLinearOnSimplexWithNoda;
2059 static PyObject *__pyx_n_s_CT_sge;
2060 static PyObject *__pyx_kp_s_Calculating_numerical_quadrature;
2061 static PyObject *__pyx_n_s_Coefficients;
2062 static PyObject *__pyx_n_s_Coefficients___init;
2063 static PyObject *__pyx_n_s_Coefficients_evaluate;
2064 static PyObject *__pyx_n_s_Coefficients_initializeElementBo;
2065 static PyObject *__pyx_n_s_Coefficients_initializeElementQu;
2066 static PyObject *__pyx_n_s_Coefficients_initializeGlobalExt;
2067 static PyObject *__pyx_kp_s_Coefficients_of_linear_ADR_equa;
2068 static PyObject *__pyx_n_s_Comm;
2069 static PyObject *__pyx_n_s_CompKernelFlag;
2070 static PyObject *__pyx_n_s_DOFBoundaryConditions;
2071 static PyObject *__pyx_n_s_FluxBoundaryConditions;
2072 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
2073 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
2074 static PyObject *__pyx_kp_s_Global_residual;
2075 static PyObject *__pyx_n_s_Hess;
2076 static PyObject *__pyx_n_s_I;
2077 static PyObject *__pyx_n_s_ImportError;
2078 static PyObject *__pyx_kp_s_Jacobian;
2079 static PyObject *__pyx_n_s_L2projectEvaluate;
2080 static PyObject *__pyx_n_s_LevelModel;
2081 static PyObject *__pyx_n_s_LevelModel___init;
2082 static PyObject *__pyx_n_s_LevelModel_calculateAuxiliaryQua;
2083 static PyObject *__pyx_n_s_LevelModel_calculateCoefficients;
2084 static PyObject *__pyx_n_s_LevelModel_calculateElementBound;
2085 static PyObject *__pyx_n_s_LevelModel_calculateElementQuadr;
2086 static PyObject *__pyx_n_s_LevelModel_calculateExteriorElem;
2087 static PyObject *__pyx_n_s_LevelModel_calculateSolutionAtQu;
2088 static PyObject *__pyx_n_s_LevelModel_estimate_mt;
2089 static PyObject *__pyx_n_s_LevelModel_getJacobian;
2090 static PyObject *__pyx_n_s_LevelModel_getResidual;
2091 static PyObject *__pyx_n_s_MOVING_DOMAIN;
2092 static PyObject *__pyx_kp_s_Mass_Conservation_Error;
2093 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
2094 static PyObject *__pyx_n_s_NonlinearEquation;
2095 static PyObject *__pyx_n_s_NumericalFlux;
2096 static PyObject *__pyx_n_s_NumericalFlux_IIPG;
2097 static PyObject *__pyx_n_s_NumericalFlux_IIPG___init;
2098 static PyObject *__pyx_n_s_NumericalFlux_NIPG;
2099 static PyObject *__pyx_n_s_NumericalFlux_NIPG___init;
2100 static PyObject *__pyx_n_s_NumericalFlux_SIPG;
2101 static PyObject *__pyx_n_s_NumericalFlux_SIPG___init;
2102 static PyObject *__pyx_n_s_OneLevelTransport;
2103 static PyObject *__pyx_kp_s_Optimized_LevelModel_for_ADR_eq;
2104 static PyObject *__pyx_n_s_PostProcessingTools;
2105 static PyObject *__pyx_n_s_Quadrature;
2106 static PyObject *__pyx_kp_s_Residual_based_shock_capturing;
2107 static PyObject *__pyx_n_s_RuntimeError;
2108 static PyObject *__pyx_n_s_SGE_base;
2109 static PyObject *__pyx_n_s_ShockCapturing;
2110 static PyObject *__pyx_n_s_ShockCapturing___init;
2111 static PyObject *__pyx_n_s_ShockCapturing_base;
2112 static PyObject *__pyx_n_s_ShockCapturing_initializeElement;
2113 static PyObject *__pyx_n_s_ShockCapturing_updateShockCaptur;
2114 static PyObject *__pyx_n_s_SimplexLobattoQuadrature;
2115 static PyObject *__pyx_n_s_SubgridError;
2116 static PyObject *__pyx_n_s_SubgridError___init;
2117 static PyObject *__pyx_kp_s_SubgridError_approximation_for;
2118 static PyObject *__pyx_n_s_SubgridError_calculateSubgridErr;
2119 static PyObject *__pyx_n_s_SubgridError_initializeElementQu;
2120 static PyObject *__pyx_n_s_SubgridError_updateSubgridErrorH;
2121 static PyObject *__pyx_n_s_TC_base;
2122 static PyObject *__pyx_n_s_TimeIntegration;
2123 static PyObject *__pyx_n_s_TimeIntegrationClass;
2124 static PyObject *__pyx_n_s_Transport;
2125 static PyObject *__pyx_kp_s_Updating_local_to_global_mapping;
2126 static PyObject *__pyx_kp_s_VOF_max_numDiff_e;
2127 static PyObject *__pyx_n_s_ValueError;
2128 static PyObject *__pyx_n_s_VelocityPostProcessingChooser;
2129 static PyObject *__pyx_n_s_XdmfWriter;
2130 static PyObject *__pyx_kp_s_You_must_use_a_numerical_flux_to;
2131 static PyObject *__pyx_n_s_a;
2132 static PyObject *__pyx_n_s_aOfX;
2133 static PyObject *__pyx_n_s_adjoint_sigma;
2134 static PyObject *__pyx_n_s_adr;
2135 static PyObject *__pyx_n_s_advection;
2136 static PyObject *__pyx_n_s_advectiveFluxBoundaryConditionsD;
2137 static PyObject *__pyx_n_s_advectiveFluxBoundaryConditionsS;
2138 static PyObject *__pyx_n_s_advectiveFlux_bc;
2139 static PyObject *__pyx_n_s_advectiveFlux_bc_flag;
2140 static PyObject *__pyx_n_s_append;
2141 static PyObject *__pyx_n_s_arange;
2142 static PyObject *__pyx_n_s_array;
2143 static PyObject *__pyx_n_s_boundaryAdjoint_sigma;
2144 static PyObject *__pyx_n_s_boundaryJac_ref;
2145 static PyObject *__pyx_n_s_boundaryJacobians;
2146 static PyObject *__pyx_n_s_boundaryNormals;
2147 static PyObject *__pyx_n_s_buildUnion;
2148 static PyObject *__pyx_n_s_c;
2149 static PyObject *__pyx_n_s_calculateAuxiliaryQuantitiesAfte;
2150 static PyObject *__pyx_n_s_calculateCoefficients;
2151 static PyObject *__pyx_n_s_calculateElementBoundaryQuadratu;
2152 static PyObject *__pyx_n_s_calculateElementQuadrature;
2153 static PyObject *__pyx_n_s_calculateExteriorElementBoundary;
2154 static PyObject *__pyx_n_s_calculateJacobian;
2155 static PyObject *__pyx_n_s_calculateQuadrature;
2156 static PyObject *__pyx_n_s_calculateResidual;
2157 static PyObject *__pyx_n_s_calculateSolutionAtQuadrature;
2158 static PyObject *__pyx_n_s_calculateSubgridError;
2159 static PyObject *__pyx_n_s_cebq;
2160 static PyObject *__pyx_n_s_cebq_global;
2161 static PyObject *__pyx_n_s_cebqe;
2162 static PyObject *__pyx_n_s_cfemIntegrals;
2163 static PyObject *__pyx_n_s_cfl;
2164 static PyObject *__pyx_n_s_ci;
2165 static PyObject *__pyx_n_s_cj;
2166 static PyObject *__pyx_n_s_ck;
2167 static PyObject *__pyx_n_s_class;
2168 static PyObject *__pyx_n_s_coefficients;
2169 static PyObject *__pyx_n_s_comm;
2170 static PyObject *__pyx_n_s_compKernelFlag;
2171 static PyObject *__pyx_n_s_components;
2172 static PyObject *__pyx_n_s_conservativeFlux;
2173 static PyObject *__pyx_n_s_conservativeFluxDict;
2174 static PyObject *__pyx_n_s_constant;
2175 static PyObject *__pyx_n_s_copy;
2176 static PyObject *__pyx_n_s_cq;
2177 static PyObject *__pyx_n_s_csrColumnOffsets;
2178 static PyObject *__pyx_n_s_csrColumnOffsets_eb;
2179 static PyObject *__pyx_n_s_csrColumnOffsets_eb_u_u;
2180 static PyObject *__pyx_n_s_csrColumnOffsets_u_u;
2181 static PyObject *__pyx_n_s_csrRowIndeces;
2182 static PyObject *__pyx_n_s_csrRowIndeces_u_u;
2183 static PyObject *__pyx_n_s_d;
2184 static PyObject *__pyx_n_s_dS_ref;
2185 static PyObject *__pyx_n_s_dV_ref;
2186 static PyObject *__pyx_n_s_data;
2187 static PyObject *__pyx_n_s_dc;
2188 static PyObject *__pyx_n_s_default;
2189 static PyObject *__pyx_n_s_defaultName;
2190 static PyObject *__pyx_n_s_df;
2191 static PyObject *__pyx_n_s_diffusion;
2192 static PyObject *__pyx_n_s_diffusionDict;
2193 static PyObject *__pyx_n_s_diffusiveFluxBoundaryConditionsD;
2194 static PyObject *__pyx_n_s_diffusiveFluxBoundaryConditionsD_2;
2195 static PyObject *__pyx_n_s_diffusiveFluxBoundaryConditionsS;
2196 static PyObject *__pyx_n_s_diffusiveFlux_bc;
2197 static PyObject *__pyx_n_s_diffusiveFlux_bc_flag;
2198 static PyObject *__pyx_n_s_dim;
2199 static PyObject *__pyx_n_s_dirichletConditions;
2200 static PyObject *__pyx_n_s_dirichletConditionsForceDOF;
2201 static PyObject *__pyx_n_s_dirichletNodeSetList;
2202 static PyObject *__pyx_n_s_doc;
2203 static PyObject *__pyx_n_s_dof;
2204 static PyObject *__pyx_n_s_dofBoundaryConditionsDict;
2205 static PyObject *__pyx_n_s_dofBoundaryConditionsSetterDict;
2206 static PyObject *__pyx_n_s_dofMap;
2207 static PyObject *__pyx_n_s_dphi;
2208 static PyObject *__pyx_n_s_dtype;
2209 static PyObject *__pyx_n_s_eN_global;
2210 static PyObject *__pyx_n_s_ebN;
2211 static PyObject *__pyx_n_s_ebNE;
2212 static PyObject *__pyx_n_s_ebN_element;
2213 static PyObject *__pyx_n_s_ebq;
2214 static PyObject *__pyx_n_s_ebq_global;
2215 static PyObject *__pyx_n_s_ebqe;
2216 static PyObject *__pyx_n_s_ebqe_a;
2217 static PyObject *__pyx_n_s_ebqe_bc_advectiveFlux_u_ext;
2218 static PyObject *__pyx_n_s_ebqe_bc_flux_u_ext;
2219 static PyObject *__pyx_n_s_ebqe_bc_u_ext;
2220 static PyObject *__pyx_n_s_ebqe_penalty;
2221 static PyObject *__pyx_n_s_ebqe_v;
2222 static PyObject *__pyx_n_s_elemQuadIsDict;
2223 static PyObject *__pyx_n_s_elementBoundaryDiametersArray;
2224 static PyObject *__pyx_n_s_elementBoundaryElementsArray;
2225 static PyObject *__pyx_n_s_elementBoundaryIntegralKeys;
2226 static PyObject *__pyx_n_s_elementBoundaryIntegrals;
2227 static PyObject *__pyx_n_s_elementBoundaryLocalElementBound;
2228 static PyObject *__pyx_n_s_elementBoundaryQuadrature;
2229 static PyObject *__pyx_n_s_elementBoundaryQuadratureDict;
2230 static PyObject *__pyx_n_s_elementBoundaryQuadratureDiction;
2231 static PyObject *__pyx_n_s_elementBoundaryQuadraturePoints;
2232 static PyObject *__pyx_n_s_elementBoundaryQuadratureRuleInd;
2233 static PyObject *__pyx_n_s_elementBoundaryQuadratureWeights;
2234 static PyObject *__pyx_n_s_elementDiameter;
2235 static PyObject *__pyx_n_s_elementDiametersArray;
2236 static PyObject *__pyx_n_s_elementEffectiveDiametersArray;
2237 static PyObject *__pyx_n_s_elementInnerDiametersArray;
2238 static PyObject *__pyx_n_s_elementIntegralKeys;
2239 static PyObject *__pyx_n_s_elementMaps;
2240 static PyObject *__pyx_n_s_elementNodesArray;
2241 static PyObject *__pyx_n_s_elementQuadrature;
2242 static PyObject *__pyx_n_s_elementQuadratureDict;
2243 static PyObject *__pyx_n_s_elementQuadratureDictionaryWrite;
2244 static PyObject *__pyx_n_s_elementQuadraturePoints;
2245 static PyObject *__pyx_n_s_elementQuadratureRuleIndeces;
2246 static PyObject *__pyx_n_s_elementQuadratureWeights;
2247 static PyObject *__pyx_kp_s_element_and_element_boundary_Jac;
2248 static PyObject *__pyx_n_s_enumerate;
2249 static PyObject *__pyx_n_s_estimate_mt;
2250 static PyObject *__pyx_n_s_evaluate;
2251 static PyObject *__pyx_n_s_exteriorElementBoundariesArray;
2252 static PyObject *__pyx_n_s_exteriorElementBoundaryQuadratur;
2253 static PyObject *__pyx_n_s_fOfX;
2254 static PyObject *__pyx_n_s_fabs;
2255 static PyObject *__pyx_n_s_fbcObject;
2256 static PyObject *__pyx_n_s_femSpace;
2257 static PyObject *__pyx_n_s_fill;
2258 static PyObject *__pyx_n_s_flag;
2259 static PyObject *__pyx_n_s_flat;
2260 static PyObject *__pyx_n_s_fluxBoundaryConditions;
2261 static PyObject *__pyx_n_s_fluxBoundaryConditionsDict;
2262 static PyObject *__pyx_n_s_fluxBoundaryConditionsObjectsDic;
2263 static PyObject *__pyx_n_s_forceStrongConditions;
2264 static PyObject *__pyx_n_s_forceStrongDirichlet;
2265 static PyObject *__pyx_n_s_g;
2266 static PyObject *__pyx_n_s_get;
2267 static PyObject *__pyx_n_s_getAdvectiveFluxBoundaryConditio;
2268 static PyObject *__pyx_n_s_getBasisGradientValuesRef;
2269 static PyObject *__pyx_n_s_getBasisGradientValuesTraceRef;
2270 static PyObject *__pyx_n_s_getBasisValuesRef;
2271 static PyObject *__pyx_n_s_getBasisValuesTraceRef;
2272 static PyObject *__pyx_n_s_getCSRrepresentation;
2273 static PyObject *__pyx_n_s_getDiffusiveFluxBoundaryConditio;
2274 static PyObject *__pyx_n_s_getJacobian;
2275 static PyObject *__pyx_n_s_getPointwiseBoundaryConditions;
2276 static PyObject *__pyx_n_s_getResidual;
2277 static PyObject *__pyx_n_s_getValues;
2278 static PyObject *__pyx_n_s_getValuesGlobalExteriorTrace;
2279 static PyObject *__pyx_n_s_globalJacobian;
2280 static PyObject *__pyx_n_s_globalMax;
2281 static PyObject *__pyx_n_s_globalResidual;
2282 static PyObject *__pyx_n_s_globalSum;
2283 static PyObject *__pyx_n_s_grad_psi;
2284 static PyObject *__pyx_n_s_grad_psi_trace;
2285 static PyObject *__pyx_kp_s_grad_u;
2286 static PyObject *__pyx_n_s_hamiltonian;
2287 static PyObject *__pyx_n_s_has_key;
2288 static PyObject *__pyx_kp_s_home_cekees_proteus_proteus_ADR;
2289 static PyObject *__pyx_n_s_i;
2290 static PyObject *__pyx_n_s_import;
2291 static PyObject *__pyx_kp_s_inflowBC_internalNodes_updateLoc;
2292 static PyObject *__pyx_n_s_inflowBoundaryBC;
2293 static PyObject *__pyx_n_s_inflowBoundaryBC_values;
2294 static PyObject *__pyx_n_s_inflowFlux;
2295 static PyObject *__pyx_n_s_init;
2296 static PyObject *__pyx_n_s_initializationPhase;
2297 static PyObject *__pyx_n_s_initializeElementBoundaryQuadrat;
2298 static PyObject *__pyx_n_s_initializeElementQuadrature;
2299 static PyObject *__pyx_n_s_initializeGlobalExteriorElementB;
2300 static PyObject *__pyx_n_s_initializeMesh;
2301 static PyObject *__pyx_n_s_initializeTimeIntegration;
2302 static PyObject *__pyx_n_s_integrateInterpolationPoints;
2303 static PyObject *__pyx_n_s_internalNodes;
2304 static PyObject *__pyx_n_s_internalNodesArray;
2305 static PyObject *__pyx_n_s_interpolationConditions;
2306 static PyObject *__pyx_n_s_isAdvectiveFluxBoundary_u;
2307 static PyObject *__pyx_n_s_isDOFBoundary;
2308 static PyObject *__pyx_n_s_isDOFBoundary_u;
2309 static PyObject *__pyx_n_s_isFluxBoundary_u;
2310 static PyObject *__pyx_n_s_iteritems;
2311 static PyObject *__pyx_n_s_jacobian;
2312 static PyObject *__pyx_n_s_k;
2313 static PyObject *__pyx_n_s_keys;
2314 static PyObject *__pyx_n_s_l2g;
2315 static PyObject *__pyx_n_s_l2proj;
2316 static PyObject *__pyx_n_s_lag;
2317 static PyObject *__pyx_n_s_lag_shockCapturing;
2318 static PyObject *__pyx_n_s_level;
2319 static PyObject *__pyx_n_s_linear;
2320 static PyObject *__pyx_n_s_localFunctionSpace;
2321 static PyObject *__pyx_n_s_log;
2322 static PyObject *__pyx_n_s_logEvent;
2323 static PyObject *__pyx_n_s_lowmem;
2324 static PyObject *__pyx_n_s_m;
2325 static PyObject *__pyx_n_s_main;
2326 static PyObject *__pyx_n_s_mass;
2327 static PyObject *__pyx_n_s_massConservationError;
2328 static PyObject *__pyx_n_s_massLumping;
2329 static PyObject *__pyx_n_s_matType;
2330 static PyObject *__pyx_n_s_math;
2331 static PyObject *__pyx_n_s_max;
2332 static PyObject *__pyx_n_s_max_nDOF_element;
2333 static PyObject *__pyx_n_s_memory;
2334 static PyObject *__pyx_n_s_mesh;
2335 static PyObject *__pyx_n_s_mesh_dof;
2336 static PyObject *__pyx_n_s_mesh_grad_trial_ref;
2337 static PyObject *__pyx_n_s_mesh_grad_trial_trace_ref;
2338 static PyObject *__pyx_n_s_mesh_l2g;
2339 static PyObject *__pyx_n_s_mesh_trial_ref;
2340 static PyObject *__pyx_n_s_mesh_trial_trace_ref;
2341 static PyObject *__pyx_n_s_metaclass;
2342 static PyObject *__pyx_n_s_mixedFlow;
2343 static PyObject *__pyx_n_s_module;
2344 static PyObject *__pyx_n_s_movingDomain;
2345 static PyObject *__pyx_n_s_n;
2346 static PyObject *__pyx_n_s_nCalls;
2347 static PyObject *__pyx_n_s_nDOF_mesh_trial_elementIn;
2348 static PyObject *__pyx_n_s_nDOF_phi_trial_element;
2349 static PyObject *__pyx_n_s_nDOF_test_element;
2350 static PyObject *__pyx_n_s_nDOF_test_elementIn;
2351 static PyObject *__pyx_n_s_nDOF_trial_element;
2352 static PyObject *__pyx_n_s_nDOF_trial_elementIn;
2353 static PyObject *__pyx_n_s_nElementBoundaries_element;
2354 static PyObject *__pyx_n_s_nElementBoundaries_global;
2355 static PyObject *__pyx_n_s_nElementBoundaryQuadraturePoints;
2356 static PyObject *__pyx_n_s_nElementBoundaryQuadraturePoints_2;
2357 static PyObject *__pyx_n_s_nElements_global;
2358 static PyObject *__pyx_n_s_nElements_owned;
2359 static PyObject *__pyx_n_s_nExteriorElementBoundaries_globa;
2360 static PyObject *__pyx_n_s_nFreeDOF_global;
2361 static PyObject *__pyx_n_s_nFreeVDOF_global;
2362 static PyObject *__pyx_n_s_nI;
2363 static PyObject *__pyx_n_s_nNodes_element;
2364 static PyObject *__pyx_n_s_nNodes_global;
2365 static PyObject *__pyx_n_s_nNodes_internal;
2366 static PyObject *__pyx_n_s_nNonzerosInJacobian;
2367 static PyObject *__pyx_n_s_nQuadraturePoints;
2368 static PyObject *__pyx_n_s_nQuadraturePoints_element;
2369 static PyObject *__pyx_n_s_nQuadraturePoints_elementBoundar;
2370 static PyObject *__pyx_n_s_nQuadraturePoints_elementIn;
2371 static PyObject *__pyx_n_s_nQuadraturePoints_global;
2372 static PyObject *__pyx_n_s_nSpaceIn;
2373 static PyObject *__pyx_n_s_nSpace_global;
2374 static PyObject *__pyx_n_s_nSteps;
2375 static PyObject *__pyx_n_s_nStepsToDelay;
2376 static PyObject *__pyx_n_s_nVDOF_element;
2377 static PyObject *__pyx_n_s_n_phi_ip_element;
2378 static PyObject *__pyx_n_s_name;
2379 static PyObject *__pyx_n_s_name_2;
2380 static PyObject *__pyx_n_s_nc;
2381 static PyObject *__pyx_n_s_nd;
2382 static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
2383 static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
2384 static PyObject *__pyx_n_s_nodeArray;
2385 static PyObject *__pyx_n_s_nodeVelocityArray;
2386 static PyObject *__pyx_n_s_nonlinear;
2387 static PyObject *__pyx_n_s_nonlinear_function_evaluations;
2388 static PyObject *__pyx_n_s_nonlinear_function_jacobian_eval;
2389 static PyObject *__pyx_n_s_normal_ref;
2390 static PyObject *__pyx_n_s_numDiff;
2391 static PyObject *__pyx_n_s_numDiff_last;
2392 static PyObject *__pyx_n_s_numericalFlux;
2393 static PyObject *__pyx_n_s_numericalFluxType;
2394 static PyObject *__pyx_n_s_numpy;
2395 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2396 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2397 static PyObject *__pyx_n_s_offset;
2398 static PyObject *__pyx_n_s_offset_u;
2399 static PyObject *__pyx_n_s_options;
2400 static PyObject *__pyx_n_s_outFlow;
2401 static PyObject *__pyx_n_s_pdb;
2402 static PyObject *__pyx_n_s_penalty;
2403 static PyObject *__pyx_n_s_penalty_constant;
2404 static PyObject *__pyx_n_s_penalty_power;
2405 static PyObject *__pyx_n_s_periodicDirichletConditions;
2406 static PyObject *__pyx_n_s_phi;
2407 static PyObject *__pyx_n_s_phiDict;
2408 static PyObject *__pyx_n_s_phiTrialIsTrial;
2409 static PyObject *__pyx_n_s_phi_ip;
2410 static PyObject *__pyx_n_s_phi_k;
2411 static PyObject *__pyx_n_s_points_elementBoundaryQuadrature;
2412 static PyObject *__pyx_n_s_potential;
2413 static PyObject *__pyx_n_s_prepare;
2414 static PyObject *__pyx_n_s_proteus;
2415 static PyObject *__pyx_n_s_proteus_FemTools;
2416 static PyObject *__pyx_n_s_proteus_NonlinearSolvers;
2417 static PyObject *__pyx_n_s_proteus_Profiling;
2418 static PyObject *__pyx_n_s_proteus_ShockCapturing;
2419 static PyObject *__pyx_n_s_proteus_SubgridError;
2420 static PyObject *__pyx_n_s_proteus_Transport;
2421 static PyObject *__pyx_n_s_proteus_TransportCoefficients;
2422 static PyObject *__pyx_n_s_proteus_ctransportCoefficients;
2423 static PyObject *__pyx_n_s_proteus_flcbdfWrappers;
2424 static PyObject *__pyx_n_s_psi;
2425 static PyObject *__pyx_n_s_psi_trace;
2426 static PyObject *__pyx_n_s_q;
2427 static PyObject *__pyx_n_s_q_a;
2428 static PyObject *__pyx_n_s_q_numDiff_u;
2429 static PyObject *__pyx_n_s_q_numDiff_u_last;
2430 static PyObject *__pyx_n_s_q_r;
2431 static PyObject *__pyx_n_s_q_v;
2432 static PyObject *__pyx_n_s_qualname;
2433 static PyObject *__pyx_n_s_r;
2434 static PyObject *__pyx_n_s_range;
2435 static PyObject *__pyx_n_s_reaction;
2436 static PyObject *__pyx_n_s_reactionLumping;
2437 static PyObject *__pyx_n_s_referenceFiniteElement;
2438 static PyObject *__pyx_n_s_reuse_test_trial_quadrature;
2439 static PyObject *__pyx_n_s_reuse_trial_and_test_quadrature;
2440 static PyObject *__pyx_n_s_row;
2441 static PyObject *__pyx_n_s_sc_alpha;
2442 static PyObject *__pyx_n_s_sc_beta;
2443 static PyObject *__pyx_n_s_sc_uref;
2444 static PyObject *__pyx_n_s_scalars_elementBoundaryQuadratur;
2445 static PyObject *__pyx_n_s_sd;
2446 static PyObject *__pyx_n_s_sdInfo;
2447 static PyObject *__pyx_n_s_sdInfo_u_u_colind;
2448 static PyObject *__pyx_n_s_sdInfo_u_u_rowptr;
2449 static PyObject *__pyx_n_s_self;
2450 static PyObject *__pyx_n_s_setDirichletValues;
2451 static PyObject *__pyx_n_s_setFlow;
2452 static PyObject *__pyx_n_s_setFromOptions;
2453 static PyObject *__pyx_n_s_setUnknowns;
2454 static PyObject *__pyx_n_s_setupFieldStrides;
2455 static PyObject *__pyx_n_s_shape;
2456 static PyObject *__pyx_n_s_shockCapturing;
2457 static PyObject *__pyx_n_s_shockCapturingDiffusion;
2458 static PyObject *__pyx_n_s_shockCapturingFactor;
2459 static PyObject *__pyx_n_s_size;
2460 static PyObject *__pyx_n_s_sparseDiffusionTensors;
2461 static PyObject *__pyx_n_s_stab;
2462 static PyObject *__pyx_n_s_stabilization;
2463 static PyObject *__pyx_n_s_stabilizationIsNonlinear;
2464 static PyObject *__pyx_n_s_start;
2465 static PyObject *__pyx_n_s_step;
2466 static PyObject *__pyx_n_s_stop;
2467 static PyObject *__pyx_n_s_stressTraceBoundaryConditionsSet;
2468 static PyObject *__pyx_n_s_stride;
2469 static PyObject *__pyx_kp_s_stride_offset;
2470 static PyObject *__pyx_n_s_stride_u;
2471 static PyObject *__pyx_n_s_sum;
2472 static PyObject *__pyx_n_s_t;
2473 static PyObject *__pyx_n_s_tLast_mesh;
2474 static PyObject *__pyx_n_s_tensors_elementBoundaryQuadratur;
2475 static PyObject *__pyx_n_s_test;
2476 static PyObject *__pyx_n_s_testIsTrial;
2477 static PyObject *__pyx_n_s_testSpace;
2478 static PyObject *__pyx_n_s_testSpaceDict;
2479 static PyObject *__pyx_n_s_timeIntegration;
2480 static PyObject *__pyx_n_s_timeTerm;
2481 static PyObject *__pyx_n_s_timeVaryingCoefficients;
2482 static PyObject *__pyx_kp_s_to_reuse_test_trial_quad_all_fem;
2483 static PyObject *__pyx_n_s_u;
2484 static PyObject *__pyx_n_s_uDict;
2485 static PyObject *__pyx_n_s_u_dof;
2486 static PyObject *__pyx_n_s_u_grad_test_ref;
2487 static PyObject *__pyx_n_s_u_grad_test_trace_ref;
2488 static PyObject *__pyx_n_s_u_grad_trial_ref;
2489 static PyObject *__pyx_n_s_u_grad_trial_trace_ref;
2490 static PyObject *__pyx_n_s_u_j;
2491 static PyObject *__pyx_n_s_u_l2g;
2492 static PyObject *__pyx_n_s_u_test_ref;
2493 static PyObject *__pyx_n_s_u_test_trace_ref;
2494 static PyObject *__pyx_n_s_u_trial_ref;
2495 static PyObject *__pyx_n_s_u_trial_trace_ref;
2496 static PyObject *__pyx_n_s_ua;
2497 static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
2498 static PyObject *__pyx_n_s_updateLocal2Global;
2499 static PyObject *__pyx_n_s_updateShockCapturingHistory;
2500 static PyObject *__pyx_n_s_updateSubgridErrorHistory;
2501 static PyObject *__pyx_n_s_useMetrics;
2502 static PyObject *__pyx_n_s_useSparseDiffusion;
2503 static PyObject *__pyx_n_s_useWeakDirichletConditions;
2504 static PyObject *__pyx_n_s_usesGradientStabilization;
2505 static PyObject *__pyx_n_s_values;
2506 static PyObject *__pyx_n_s_variableNames;
2507 static PyObject *__pyx_n_s_vectors_elementBoundaryQuadratur;
2508 static PyObject *__pyx_n_s_velocity;
2509 static PyObject *__pyx_n_s_velocityPostProcessor;
2510 static PyObject *__pyx_kp_s_velocity_postprocessor;
2511 static PyObject *__pyx_n_s_vt;
2512 static PyObject *__pyx_n_s_weakDirichletConditions;
2513 static PyObject *__pyx_n_s_x;
2514 static PyObject *__pyx_n_s_zeroJacobian_CSR;
2515 static PyObject *__pyx_n_s_zeros;
2516 static int __pyx_pf_3ADR_3ADR___cinit__(struct __pyx_obj_3ADR_ADR *__pyx_v_self, int __pyx_v_nSpaceIn, int __pyx_v_nQuadraturePoints_elementIn, int __pyx_v_nDOF_mesh_trial_elementIn, int __pyx_v_nDOF_trial_elementIn, int __pyx_v_nDOF_test_elementIn, int __pyx_v_nQuadraturePoints_elementBoundaryIn, int __pyx_v_CompKernelFlag); /* proto */
2517 static void __pyx_pf_3ADR_3ADR_2__dealloc__(struct __pyx_obj_3ADR_ADR *__pyx_v_self); /* proto */
2518 static PyObject *__pyx_pf_3ADR_3ADR_4calculateResidual(struct __pyx_obj_3ADR_ADR *__pyx_v_self, PyArrayObject *__pyx_v_mesh_trial_ref, PyArrayObject *__pyx_v_mesh_grad_trial_ref, PyArrayObject *__pyx_v_mesh_dof, PyArrayObject *__pyx_v_mesh_l2g, PyArrayObject *__pyx_v_dV_ref, PyArrayObject *__pyx_v_u_trial_ref, PyArrayObject *__pyx_v_u_grad_trial_ref, PyArrayObject *__pyx_v_u_test_ref, PyArrayObject *__pyx_v_u_grad_test_ref, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_cfl, double __pyx_v_CT_sge, double __pyx_v_sc_uref, double __pyx_v_sc_alpha, double __pyx_v_useMetrics, PyArrayObject *__pyx_v_mesh_trial_trace_ref, PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref, PyArrayObject *__pyx_v_dS_ref, PyArrayObject *__pyx_v_u_trial_trace_ref, PyArrayObject *__pyx_v_u_grad_trial_trace_ref, PyArrayObject *__pyx_v_u_test_trace_ref, PyArrayObject *__pyx_v_u_grad_test_trace_ref, PyArrayObject *__pyx_v_normal_ref, PyArrayObject *__pyx_v_boundaryJac_ref, int __pyx_v_nElements_global, PyArrayObject *__pyx_v_u_l2g, PyArrayObject *__pyx_v_u_dof, PyArrayObject *__pyx_v_sdInfo_u_u_rowptr, PyArrayObject *__pyx_v_sdInfo_u_u_colind, PyArrayObject *__pyx_v_q_a, PyArrayObject *__pyx_v_q_v, PyArrayObject *__pyx_v_q_r, int __pyx_v_lag_shockCapturing, double __pyx_v_shockCapturingDiffusion, PyArrayObject *__pyx_v_q_numDiff_u, PyArrayObject *__pyx_v_q_numDiff_u_last, int __pyx_v_offset_u, int __pyx_v_stride_u, PyArrayObject *__pyx_v_globalResidual, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebqe_a, PyArrayObject *__pyx_v_ebqe_v, PyArrayObject *__pyx_v_isDOFBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_u_ext, PyArrayObject *__pyx_v_isFluxBoundary_u, PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext, PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext, PyArrayObject *__pyx_v_ebqe_penalty, double __pyx_v_adjoint_sigma); /* proto */
2519 static PyObject *__pyx_pf_3ADR_3ADR_6calculateJacobian(struct __pyx_obj_3ADR_ADR *__pyx_v_self, PyArrayObject *__pyx_v_mesh_trial_ref, PyArrayObject *__pyx_v_mesh_grad_trial_ref, PyArrayObject *__pyx_v_mesh_dof, PyArrayObject *__pyx_v_mesh_l2g, PyArrayObject *__pyx_v_dV_ref, PyArrayObject *__pyx_v_u_trial_ref, PyArrayObject *__pyx_v_u_grad_trial_ref, PyArrayObject *__pyx_v_u_test_ref, PyArrayObject *__pyx_v_u_grad_test_ref, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_cfl, double __pyx_v_CT_sge, double __pyx_v_sc_uref, double __pyx_v_sc_alpha, double __pyx_v_useMetrics, PyArrayObject *__pyx_v_mesh_trial_trace_ref, PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref, PyArrayObject *__pyx_v_dS_ref, PyArrayObject *__pyx_v_u_trial_trace_ref, PyArrayObject *__pyx_v_u_grad_trial_trace_ref, PyArrayObject *__pyx_v_u_test_trace_ref, PyArrayObject *__pyx_v_u_grad_test_trace_ref, PyArrayObject *__pyx_v_normal_ref, PyArrayObject *__pyx_v_boundaryJac_ref, int __pyx_v_nElements_global, PyArrayObject *__pyx_v_u_l2g, PyArrayObject *__pyx_v_u_dof, PyArrayObject *__pyx_v_sdInfo_u_u_rowptr, PyArrayObject *__pyx_v_sdInfo_u_u_colind, PyArrayObject *__pyx_v_q_a, PyArrayObject *__pyx_v_q_v, PyArrayObject *__pyx_v_q_r, int __pyx_v_lag_shockCapturing, double __pyx_v_shockCapturingDiffusion, PyArrayObject *__pyx_v_q_numDiff_u, PyArrayObject *__pyx_v_q_numDiff_u_last, PyArrayObject *__pyx_v_csrRowIndeces_u_u, PyArrayObject *__pyx_v_csrColumnOffsets_u_u, PyObject *__pyx_v_globalJacobian, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebqe_a, PyArrayObject *__pyx_v_ebqe_v, PyArrayObject *__pyx_v_isDOFBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_u_ext, PyArrayObject *__pyx_v_isFluxBoundary_u, PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext, PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext, PyArrayObject *__pyx_v_csrColumnOffsets_eb_u_u, PyArrayObject *__pyx_v_ebqe_penalty, double __pyx_v_adjoint_sigma); /* proto */
2520 static PyObject *__pyx_pf_3ADR_12SubgridError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_nd); /* proto */
2521 static PyObject *__pyx_pf_3ADR_12SubgridError_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_mesh, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_cq); /* proto */
2522 static PyObject *__pyx_pf_3ADR_12SubgridError_4updateSubgridErrorHistory(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_initializationPhase); /* proto */
2523 static PyObject *__pyx_pf_3ADR_12SubgridError_6calculateSubgridError(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_q); /* proto */
2524 static PyObject *__pyx_pf_3ADR_14ShockCapturing___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_nd, PyObject *__pyx_v_shockCapturingFactor, PyObject *__pyx_v_lag, PyObject *__pyx_v_nStepsToDelay); /* proto */
2525 static PyObject *__pyx_pf_3ADR_14ShockCapturing_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mesh, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cq); /* proto */
2526 static PyObject *__pyx_pf_3ADR_14ShockCapturing_4updateShockCapturingHistory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
2527 static PyObject *__pyx_pf_3ADR_18NumericalFlux_IIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions); /* proto */
2528 static PyObject *__pyx_pf_3ADR_18NumericalFlux_SIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions); /* proto */
2529 static PyObject *__pyx_pf_3ADR_18NumericalFlux_NIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions); /* proto */
2530 static PyObject *__pyx_pf_3ADR_12Coefficients___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_aOfX, PyObject *__pyx_v_fOfX, PyObject *__pyx_v_velocity, PyObject *__pyx_v_nc, PyObject *__pyx_v_nd, PyObject *__pyx_v_l2proj, PyObject *__pyx_v_timeVaryingCoefficients, PyObject *__pyx_v_forceStrongDirichlet, PyObject *__pyx_v_useMetrics, PyObject *__pyx_v_sc_uref, PyObject *__pyx_v_sc_beta); /* proto */
2531 static PyObject *__pyx_pf_3ADR_12Coefficients_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cq); /* proto */
2532 static PyObject *__pyx_pf_3ADR_12Coefficients_4initializeElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cebq, PyObject *__pyx_v_cebq_global); /* proto */
2533 static PyObject *__pyx_pf_3ADR_12Coefficients_6initializeGlobalExteriorElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cebqe); /* proto */
2534 static PyObject *__pyx_pf_3ADR_12Coefficients_8evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_c); /* proto */
2535 static PyObject *__pyx_pf_3ADR_10LevelModel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_uDict, PyObject *__pyx_v_phiDict, PyObject *__pyx_v_testSpaceDict, PyObject *__pyx_v_matType, PyObject *__pyx_v_dofBoundaryConditionsDict, PyObject *__pyx_v_dofBoundaryConditionsSetterDict, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_elementQuadrature, PyObject *__pyx_v_elementBoundaryQuadrature, PyObject *__pyx_v_fluxBoundaryConditionsDict, PyObject *__pyx_v_advectiveFluxBoundaryConditionsSetterDict, PyObject *__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, CYTHON_UNUSED PyObject *__pyx_v_stressTraceBoundaryConditionsSetterDict, PyObject *__pyx_v_stabilization, PyObject *__pyx_v_shockCapturing, PyObject *__pyx_v_conservativeFluxDict, PyObject *__pyx_v_numericalFluxType, PyObject *__pyx_v_TimeIntegrationClass, PyObject *__pyx_v_massLumping, PyObject *__pyx_v_reactionLumping, PyObject *__pyx_v_options, PyObject *__pyx_v_name, PyObject *__pyx_v_reuse_trial_and_test_quadrature, PyObject *__pyx_v_sd, PyObject *__pyx_v_movingDomain); /* proto */
2536 static PyObject *__pyx_pf_3ADR_10LevelModel_2calculateCoefficients(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2537 static PyObject *__pyx_pf_3ADR_10LevelModel_4getResidual(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_u, PyObject *__pyx_v_r); /* proto */
2538 static PyObject *__pyx_pf_3ADR_10LevelModel_6getJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_jacobian); /* proto */
2539 static PyObject *__pyx_pf_3ADR_10LevelModel_8calculateElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
2540 static PyObject *__pyx_pf_3ADR_10LevelModel_10calculateElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2541 static PyObject *__pyx_pf_3ADR_10LevelModel_12calculateExteriorElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
2542 static PyObject *__pyx_pf_3ADR_10LevelModel_14estimate_mt(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2543 static PyObject *__pyx_pf_3ADR_10LevelModel_16calculateAuxiliaryQuantitiesAfterStep(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2544 static PyObject *__pyx_pf_3ADR_10LevelModel_18calculateSolutionAtQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2545 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2546 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
2547 static PyObject *__pyx_tp_new_3ADR_ADR(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2548 static PyObject *__pyx_float_0_0;
2549 static PyObject *__pyx_float_1_0;
2550 static PyObject *__pyx_float_0_25;
2551 static PyObject *__pyx_int_0;
2552 static PyObject *__pyx_int_1;
2553 static PyObject *__pyx_int_2;
2554 static PyObject *__pyx_int_3;
2555 static PyObject *__pyx_int_4;
2556 static PyObject *__pyx_int_5;
2557 static PyObject *__pyx_int_6;
2558 static PyObject *__pyx_int_9;
2559 static PyObject *__pyx_int_10;
2560 static PyObject *__pyx_tuple_;
2561 static PyObject *__pyx_slice__2;
2562 static PyObject *__pyx_slice__5;
2563 static PyObject *__pyx_slice__7;
2564 static PyObject *__pyx_slice__8;
2565 static PyObject *__pyx_tuple__3;
2566 static PyObject *__pyx_tuple__4;
2567 static PyObject *__pyx_tuple__6;
2568 static PyObject *__pyx_tuple__9;
2569 static PyObject *__pyx_slice__10;
2570 static PyObject *__pyx_slice__11;
2571 static PyObject *__pyx_slice__13;
2572 static PyObject *__pyx_slice__14;
2573 static PyObject *__pyx_slice__16;
2574 static PyObject *__pyx_slice__18;
2575 static PyObject *__pyx_slice__20;
2576 static PyObject *__pyx_slice__22;
2577 static PyObject *__pyx_slice__24;
2578 static PyObject *__pyx_slice__26;
2579 static PyObject *__pyx_tuple__12;
2580 static PyObject *__pyx_tuple__15;
2581 static PyObject *__pyx_tuple__17;
2582 static PyObject *__pyx_tuple__19;
2583 static PyObject *__pyx_tuple__21;
2584 static PyObject *__pyx_tuple__23;
2585 static PyObject *__pyx_tuple__25;
2586 static PyObject *__pyx_tuple__27;
2587 static PyObject *__pyx_tuple__28;
2588 static PyObject *__pyx_tuple__29;
2589 static PyObject *__pyx_tuple__30;
2590 static PyObject *__pyx_tuple__31;
2591 static PyObject *__pyx_tuple__32;
2592 static PyObject *__pyx_tuple__33;
2593 static PyObject *__pyx_tuple__34;
2594 static PyObject *__pyx_tuple__35;
2595 static PyObject *__pyx_tuple__36;
2596 static PyObject *__pyx_tuple__37;
2597 static PyObject *__pyx_tuple__38;
2598 static PyObject *__pyx_tuple__39;
2599 static PyObject *__pyx_tuple__40;
2600 static PyObject *__pyx_tuple__41;
2601 static PyObject *__pyx_tuple__42;
2602 static PyObject *__pyx_tuple__43;
2603 static PyObject *__pyx_tuple__44;
2604 static PyObject *__pyx_tuple__45;
2605 static PyObject *__pyx_tuple__46;
2606 static PyObject *__pyx_tuple__47;
2607 static PyObject *__pyx_tuple__48;
2608 static PyObject *__pyx_tuple__49;
2609 static PyObject *__pyx_tuple__50;
2610 static PyObject *__pyx_tuple__51;
2611 static PyObject *__pyx_tuple__52;
2612 static PyObject *__pyx_tuple__53;
2613 static PyObject *__pyx_tuple__54;
2614 static PyObject *__pyx_tuple__55;
2615 static PyObject *__pyx_tuple__56;
2616 static PyObject *__pyx_tuple__57;
2617 static PyObject *__pyx_tuple__58;
2618 static PyObject *__pyx_tuple__59;
2619 static PyObject *__pyx_tuple__60;
2620 static PyObject *__pyx_tuple__61;
2621 static PyObject *__pyx_tuple__62;
2622 static PyObject *__pyx_tuple__63;
2623 static PyObject *__pyx_tuple__64;
2624 static PyObject *__pyx_tuple__65;
2625 static PyObject *__pyx_tuple__66;
2626 static PyObject *__pyx_tuple__67;
2627 static PyObject *__pyx_tuple__68;
2628 static PyObject *__pyx_tuple__69;
2629 static PyObject *__pyx_tuple__70;
2630 static PyObject *__pyx_tuple__71;
2631 static PyObject *__pyx_tuple__72;
2632 static PyObject *__pyx_tuple__73;
2633 static PyObject *__pyx_tuple__74;
2634 static PyObject *__pyx_tuple__75;
2635 static PyObject *__pyx_tuple__76;
2636 static PyObject *__pyx_tuple__77;
2637 static PyObject *__pyx_tuple__78;
2638 static PyObject *__pyx_tuple__79;
2639 static PyObject *__pyx_tuple__80;
2640 static PyObject *__pyx_tuple__81;
2641 static PyObject *__pyx_tuple__82;
2642 static PyObject *__pyx_tuple__83;
2643 static PyObject *__pyx_tuple__84;
2644 static PyObject *__pyx_tuple__85;
2645 static PyObject *__pyx_tuple__86;
2646 static PyObject *__pyx_tuple__87;
2647 static PyObject *__pyx_tuple__88;
2648 static PyObject *__pyx_tuple__89;
2649 static PyObject *__pyx_tuple__90;
2650 static PyObject *__pyx_tuple__91;
2651 static PyObject *__pyx_tuple__92;
2652 static PyObject *__pyx_tuple__93;
2653 static PyObject *__pyx_tuple__94;
2654 static PyObject *__pyx_tuple__95;
2655 static PyObject *__pyx_tuple__96;
2656 static PyObject *__pyx_tuple__97;
2657 static PyObject *__pyx_tuple__98;
2658 static PyObject *__pyx_tuple__99;
2659 static PyObject *__pyx_tuple__100;
2660 static PyObject *__pyx_tuple__101;
2661 static PyObject *__pyx_tuple__102;
2662 static PyObject *__pyx_tuple__104;
2663 static PyObject *__pyx_tuple__106;
2664 static PyObject *__pyx_tuple__108;
2665 static PyObject *__pyx_tuple__109;
2666 static PyObject *__pyx_tuple__111;
2667 static PyObject *__pyx_tuple__113;
2668 static PyObject *__pyx_tuple__114;
2669 static PyObject *__pyx_tuple__116;
2670 static PyObject *__pyx_tuple__118;
2671 static PyObject *__pyx_tuple__120;
2672 static PyObject *__pyx_tuple__122;
2673 static PyObject *__pyx_tuple__124;
2674 static PyObject *__pyx_tuple__126;
2675 static PyObject *__pyx_tuple__127;
2676 static PyObject *__pyx_tuple__129;
2677 static PyObject *__pyx_tuple__131;
2678 static PyObject *__pyx_tuple__133;
2679 static PyObject *__pyx_tuple__135;
2680 static PyObject *__pyx_tuple__137;
2681 static PyObject *__pyx_tuple__138;
2682 static PyObject *__pyx_tuple__140;
2683 static PyObject *__pyx_tuple__142;
2684 static PyObject *__pyx_tuple__144;
2685 static PyObject *__pyx_tuple__146;
2686 static PyObject *__pyx_tuple__148;
2687 static PyObject *__pyx_tuple__150;
2688 static PyObject *__pyx_tuple__152;
2689 static PyObject *__pyx_tuple__154;
2690 static PyObject *__pyx_codeobj__103;
2691 static PyObject *__pyx_codeobj__105;
2692 static PyObject *__pyx_codeobj__107;
2693 static PyObject *__pyx_codeobj__110;
2694 static PyObject *__pyx_codeobj__112;
2695 static PyObject *__pyx_codeobj__115;
2696 static PyObject *__pyx_codeobj__117;
2697 static PyObject *__pyx_codeobj__119;
2698 static PyObject *__pyx_codeobj__121;
2699 static PyObject *__pyx_codeobj__123;
2700 static PyObject *__pyx_codeobj__125;
2701 static PyObject *__pyx_codeobj__128;
2702 static PyObject *__pyx_codeobj__130;
2703 static PyObject *__pyx_codeobj__132;
2704 static PyObject *__pyx_codeobj__134;
2705 static PyObject *__pyx_codeobj__136;
2706 static PyObject *__pyx_codeobj__139;
2707 static PyObject *__pyx_codeobj__141;
2708 static PyObject *__pyx_codeobj__143;
2709 static PyObject *__pyx_codeobj__145;
2710 static PyObject *__pyx_codeobj__147;
2711 static PyObject *__pyx_codeobj__149;
2712 static PyObject *__pyx_codeobj__151;
2713 static PyObject *__pyx_codeobj__153;
2714 static PyObject *__pyx_codeobj__155;
2715 
2716 /* "ADR.pyx":146
2717  *
2718  * cdef cppADR_base* thisptr
2719  * def __cinit__(self, # <<<<<<<<<<<<<<
2720  * int nSpaceIn,
2721  * int nQuadraturePoints_elementIn,
2722  */
2723 
2724 /* Python wrapper */
2725 static int __pyx_pw_3ADR_3ADR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2726 static int __pyx_pw_3ADR_3ADR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2727  int __pyx_v_nSpaceIn;
2728  int __pyx_v_nQuadraturePoints_elementIn;
2729  int __pyx_v_nDOF_mesh_trial_elementIn;
2730  int __pyx_v_nDOF_trial_elementIn;
2731  int __pyx_v_nDOF_test_elementIn;
2732  int __pyx_v_nQuadraturePoints_elementBoundaryIn;
2733  int __pyx_v_CompKernelFlag;
2734  int __pyx_r;
2735  __Pyx_RefNannyDeclarations
2736  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2737  {
2738  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nSpaceIn,&__pyx_n_s_nQuadraturePoints_elementIn,&__pyx_n_s_nDOF_mesh_trial_elementIn,&__pyx_n_s_nDOF_trial_elementIn,&__pyx_n_s_nDOF_test_elementIn,&__pyx_n_s_nQuadraturePoints_elementBoundar,&__pyx_n_s_CompKernelFlag,0};
2739  PyObject* values[7] = {0,0,0,0,0,0,0};
2740  if (unlikely(__pyx_kwds)) {
2741  Py_ssize_t kw_args;
2742  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2743  switch (pos_args) {
2744  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2745  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2746  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2747  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2748  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2749  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2750  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2751  case 0: break;
2752  default: goto __pyx_L5_argtuple_error;
2753  }
2754  kw_args = PyDict_Size(__pyx_kwds);
2755  switch (pos_args) {
2756  case 0:
2757  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nSpaceIn)) != 0)) kw_args--;
2758  else goto __pyx_L5_argtuple_error;
2759  case 1:
2760  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementIn)) != 0)) kw_args--;
2761  else {
2762  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 1); __PYX_ERR(0, 146, __pyx_L3_error)
2763  }
2764  case 2:
2765  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nDOF_mesh_trial_elementIn)) != 0)) kw_args--;
2766  else {
2767  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 2); __PYX_ERR(0, 146, __pyx_L3_error)
2768  }
2769  case 3:
2770  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nDOF_trial_elementIn)) != 0)) kw_args--;
2771  else {
2772  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 3); __PYX_ERR(0, 146, __pyx_L3_error)
2773  }
2774  case 4:
2775  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nDOF_test_elementIn)) != 0)) kw_args--;
2776  else {
2777  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 4); __PYX_ERR(0, 146, __pyx_L3_error)
2778  }
2779  case 5:
2780  if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementBoundar)) != 0)) kw_args--;
2781  else {
2782  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 5); __PYX_ERR(0, 146, __pyx_L3_error)
2783  }
2784  case 6:
2785  if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_CompKernelFlag)) != 0)) kw_args--;
2786  else {
2787  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 6); __PYX_ERR(0, 146, __pyx_L3_error)
2788  }
2789  }
2790  if (unlikely(kw_args > 0)) {
2791  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 146, __pyx_L3_error)
2792  }
2793  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
2794  goto __pyx_L5_argtuple_error;
2795  } else {
2796  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2797  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2798  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2799  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2800  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2801  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2802  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2803  }
2804  __pyx_v_nSpaceIn = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nSpaceIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
2805  __pyx_v_nQuadraturePoints_elementIn = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nQuadraturePoints_elementIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L3_error)
2806  __pyx_v_nDOF_mesh_trial_elementIn = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nDOF_mesh_trial_elementIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L3_error)
2807  __pyx_v_nDOF_trial_elementIn = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nDOF_trial_elementIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 150, __pyx_L3_error)
2808  __pyx_v_nDOF_test_elementIn = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nDOF_test_elementIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L3_error)
2809  __pyx_v_nQuadraturePoints_elementBoundaryIn = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_nQuadraturePoints_elementBoundaryIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 152, __pyx_L3_error)
2810  __pyx_v_CompKernelFlag = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_CompKernelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 153, __pyx_L3_error)
2811  }
2812  goto __pyx_L4_argument_unpacking_done;
2813  __pyx_L5_argtuple_error:;
2814  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 146, __pyx_L3_error)
2815  __pyx_L3_error:;
2816  __Pyx_AddTraceback("ADR.ADR.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2817  __Pyx_RefNannyFinishContext();
2818  return -1;
2819  __pyx_L4_argument_unpacking_done:;
2820  __pyx_r = __pyx_pf_3ADR_3ADR___cinit__(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self), __pyx_v_nSpaceIn, __pyx_v_nQuadraturePoints_elementIn, __pyx_v_nDOF_mesh_trial_elementIn, __pyx_v_nDOF_trial_elementIn, __pyx_v_nDOF_test_elementIn, __pyx_v_nQuadraturePoints_elementBoundaryIn, __pyx_v_CompKernelFlag);
2821 
2822  /* function exit code */
2823  __Pyx_RefNannyFinishContext();
2824  return __pyx_r;
2825 }
2826 
2827 static int __pyx_pf_3ADR_3ADR___cinit__(struct __pyx_obj_3ADR_ADR *__pyx_v_self, int __pyx_v_nSpaceIn, int __pyx_v_nQuadraturePoints_elementIn, int __pyx_v_nDOF_mesh_trial_elementIn, int __pyx_v_nDOF_trial_elementIn, int __pyx_v_nDOF_test_elementIn, int __pyx_v_nQuadraturePoints_elementBoundaryIn, int __pyx_v_CompKernelFlag) {
2828  int __pyx_r;
2829  __Pyx_RefNannyDeclarations
2830  __Pyx_RefNannySetupContext("__cinit__", 0);
2831 
2832  /* "ADR.pyx":154
2833  * int nQuadraturePoints_elementBoundaryIn,
2834  * int CompKernelFlag):
2835  * self.thisptr = newADR(nSpaceIn, # <<<<<<<<<<<<<<
2836  * nQuadraturePoints_elementIn,
2837  * nDOF_mesh_trial_elementIn,
2838  */
2839  __pyx_v_self->thisptr = proteus::newADR(__pyx_v_nSpaceIn, __pyx_v_nQuadraturePoints_elementIn, __pyx_v_nDOF_mesh_trial_elementIn, __pyx_v_nDOF_trial_elementIn, __pyx_v_nDOF_test_elementIn, __pyx_v_nQuadraturePoints_elementBoundaryIn, __pyx_v_CompKernelFlag);
2840 
2841  /* "ADR.pyx":146
2842  *
2843  * cdef cppADR_base* thisptr
2844  * def __cinit__(self, # <<<<<<<<<<<<<<
2845  * int nSpaceIn,
2846  * int nQuadraturePoints_elementIn,
2847  */
2848 
2849  /* function exit code */
2850  __pyx_r = 0;
2851  __Pyx_RefNannyFinishContext();
2852  return __pyx_r;
2853 }
2854 
2855 /* "ADR.pyx":161
2856  * nQuadraturePoints_elementBoundaryIn,
2857  * CompKernelFlag)
2858  * def __dealloc__(self): # <<<<<<<<<<<<<<
2859  * del self.thisptr
2860  * def calculateResidual(self,
2861  */
2862 
2863 /* Python wrapper */
2864 static void __pyx_pw_3ADR_3ADR_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
2865 static void __pyx_pw_3ADR_3ADR_3__dealloc__(PyObject *__pyx_v_self) {
2866  __Pyx_RefNannyDeclarations
2867  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
2868  __pyx_pf_3ADR_3ADR_2__dealloc__(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self));
2869 
2870  /* function exit code */
2871  __Pyx_RefNannyFinishContext();
2872 }
2873 
2874 static void __pyx_pf_3ADR_3ADR_2__dealloc__(struct __pyx_obj_3ADR_ADR *__pyx_v_self) {
2875  __Pyx_RefNannyDeclarations
2876  __Pyx_RefNannySetupContext("__dealloc__", 0);
2877 
2878  /* "ADR.pyx":162
2879  * CompKernelFlag)
2880  * def __dealloc__(self):
2881  * del self.thisptr # <<<<<<<<<<<<<<
2882  * def calculateResidual(self,
2883  * numpy.ndarray mesh_trial_ref,
2884  */
2885  delete __pyx_v_self->thisptr;
2886 
2887  /* "ADR.pyx":161
2888  * nQuadraturePoints_elementBoundaryIn,
2889  * CompKernelFlag)
2890  * def __dealloc__(self): # <<<<<<<<<<<<<<
2891  * del self.thisptr
2892  * def calculateResidual(self,
2893  */
2894 
2895  /* function exit code */
2896  __Pyx_RefNannyFinishContext();
2897 }
2898 
2899 /* "ADR.pyx":163
2900  * def __dealloc__(self):
2901  * del self.thisptr
2902  * def calculateResidual(self, # <<<<<<<<<<<<<<
2903  * numpy.ndarray mesh_trial_ref,
2904  * numpy.ndarray mesh_grad_trial_ref,
2905  */
2906 
2907 /* Python wrapper */
2908 static PyObject *__pyx_pw_3ADR_3ADR_5calculateResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2909 static PyObject *__pyx_pw_3ADR_3ADR_5calculateResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2910  PyArrayObject *__pyx_v_mesh_trial_ref = 0;
2911  PyArrayObject *__pyx_v_mesh_grad_trial_ref = 0;
2912  PyArrayObject *__pyx_v_mesh_dof = 0;
2913  PyArrayObject *__pyx_v_mesh_l2g = 0;
2914  PyArrayObject *__pyx_v_dV_ref = 0;
2915  PyArrayObject *__pyx_v_u_trial_ref = 0;
2916  PyArrayObject *__pyx_v_u_grad_trial_ref = 0;
2917  PyArrayObject *__pyx_v_u_test_ref = 0;
2918  PyArrayObject *__pyx_v_u_grad_test_ref = 0;
2919  PyArrayObject *__pyx_v_elementDiameter = 0;
2920  PyArrayObject *__pyx_v_cfl = 0;
2921  double __pyx_v_CT_sge;
2922  double __pyx_v_sc_uref;
2923  double __pyx_v_sc_alpha;
2924  double __pyx_v_useMetrics;
2925  PyArrayObject *__pyx_v_mesh_trial_trace_ref = 0;
2926  PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref = 0;
2927  PyArrayObject *__pyx_v_dS_ref = 0;
2928  PyArrayObject *__pyx_v_u_trial_trace_ref = 0;
2929  PyArrayObject *__pyx_v_u_grad_trial_trace_ref = 0;
2930  PyArrayObject *__pyx_v_u_test_trace_ref = 0;
2931  PyArrayObject *__pyx_v_u_grad_test_trace_ref = 0;
2932  PyArrayObject *__pyx_v_normal_ref = 0;
2933  PyArrayObject *__pyx_v_boundaryJac_ref = 0;
2934  int __pyx_v_nElements_global;
2935  PyArrayObject *__pyx_v_u_l2g = 0;
2936  PyArrayObject *__pyx_v_u_dof = 0;
2937  PyArrayObject *__pyx_v_sdInfo_u_u_rowptr = 0;
2938  PyArrayObject *__pyx_v_sdInfo_u_u_colind = 0;
2939  PyArrayObject *__pyx_v_q_a = 0;
2940  PyArrayObject *__pyx_v_q_v = 0;
2941  PyArrayObject *__pyx_v_q_r = 0;
2942  int __pyx_v_lag_shockCapturing;
2943  double __pyx_v_shockCapturingDiffusion;
2944  PyArrayObject *__pyx_v_q_numDiff_u = 0;
2945  PyArrayObject *__pyx_v_q_numDiff_u_last = 0;
2946  int __pyx_v_offset_u;
2947  int __pyx_v_stride_u;
2948  PyArrayObject *__pyx_v_globalResidual = 0;
2949  int __pyx_v_nExteriorElementBoundaries_global;
2950  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
2951  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
2952  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
2953  PyArrayObject *__pyx_v_ebqe_a = 0;
2954  PyArrayObject *__pyx_v_ebqe_v = 0;
2955  PyArrayObject *__pyx_v_isDOFBoundary_u = 0;
2956  PyArrayObject *__pyx_v_ebqe_bc_u_ext = 0;
2957  PyArrayObject *__pyx_v_isFluxBoundary_u = 0;
2958  PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u = 0;
2959  PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext = 0;
2960  PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext = 0;
2961  PyArrayObject *__pyx_v_ebqe_penalty = 0;
2962  double __pyx_v_adjoint_sigma;
2963  PyObject *__pyx_r = 0;
2964  __Pyx_RefNannyDeclarations
2965  __Pyx_RefNannySetupContext("calculateResidual (wrapper)", 0);
2966  {
2967  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mesh_trial_ref,&__pyx_n_s_mesh_grad_trial_ref,&__pyx_n_s_mesh_dof,&__pyx_n_s_mesh_l2g,&__pyx_n_s_dV_ref,&__pyx_n_s_u_trial_ref,&__pyx_n_s_u_grad_trial_ref,&__pyx_n_s_u_test_ref,&__pyx_n_s_u_grad_test_ref,&__pyx_n_s_elementDiameter,&__pyx_n_s_cfl,&__pyx_n_s_CT_sge,&__pyx_n_s_sc_uref,&__pyx_n_s_sc_alpha,&__pyx_n_s_useMetrics,&__pyx_n_s_mesh_trial_trace_ref,&__pyx_n_s_mesh_grad_trial_trace_ref,&__pyx_n_s_dS_ref,&__pyx_n_s_u_trial_trace_ref,&__pyx_n_s_u_grad_trial_trace_ref,&__pyx_n_s_u_test_trace_ref,&__pyx_n_s_u_grad_test_trace_ref,&__pyx_n_s_normal_ref,&__pyx_n_s_boundaryJac_ref,&__pyx_n_s_nElements_global,&__pyx_n_s_u_l2g,&__pyx_n_s_u_dof,&__pyx_n_s_sdInfo_u_u_rowptr,&__pyx_n_s_sdInfo_u_u_colind,&__pyx_n_s_q_a,&__pyx_n_s_q_v,&__pyx_n_s_q_r,&__pyx_n_s_lag_shockCapturing,&__pyx_n_s_shockCapturingDiffusion,&__pyx_n_s_q_numDiff_u,&__pyx_n_s_q_numDiff_u_last,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_globalResidual,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_ebqe_a,&__pyx_n_s_ebqe_v,&__pyx_n_s_isDOFBoundary_u,&__pyx_n_s_ebqe_bc_u_ext,&__pyx_n_s_isFluxBoundary_u,&__pyx_n_s_isAdvectiveFluxBoundary_u,&__pyx_n_s_ebqe_bc_flux_u_ext,&__pyx_n_s_ebqe_bc_advectiveFlux_u_ext,&__pyx_n_s_ebqe_penalty,&__pyx_n_s_adjoint_sigma,0};
2968  PyObject* values[53] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
2969  if (unlikely(__pyx_kwds)) {
2970  Py_ssize_t kw_args;
2971  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2972  switch (pos_args) {
2973  case 53: values[52] = PyTuple_GET_ITEM(__pyx_args, 52);
2974  case 52: values[51] = PyTuple_GET_ITEM(__pyx_args, 51);
2975  case 51: values[50] = PyTuple_GET_ITEM(__pyx_args, 50);
2976  case 50: values[49] = PyTuple_GET_ITEM(__pyx_args, 49);
2977  case 49: values[48] = PyTuple_GET_ITEM(__pyx_args, 48);
2978  case 48: values[47] = PyTuple_GET_ITEM(__pyx_args, 47);
2979  case 47: values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
2980  case 46: values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
2981  case 45: values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
2982  case 44: values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
2983  case 43: values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
2984  case 42: values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
2985  case 41: values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
2986  case 40: values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
2987  case 39: values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
2988  case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
2989  case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
2990  case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
2991  case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
2992  case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
2993  case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
2994  case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
2995  case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
2996  case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
2997  case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
2998  case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
2999  case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3000  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3001  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3002  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3003  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3004  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3005  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3006  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3007  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3008  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3009  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3010  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3011  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3012  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3013  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3014  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3015  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3016  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3017  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3018  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3019  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3020  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3021  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3022  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3023  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3024  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3025  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3026  case 0: break;
3027  default: goto __pyx_L5_argtuple_error;
3028  }
3029  kw_args = PyDict_Size(__pyx_kwds);
3030  switch (pos_args) {
3031  case 0:
3032  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_trial_ref)) != 0)) kw_args--;
3033  else goto __pyx_L5_argtuple_error;
3034  case 1:
3035  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_grad_trial_ref)) != 0)) kw_args--;
3036  else {
3037  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 1); __PYX_ERR(0, 163, __pyx_L3_error)
3038  }
3039  case 2:
3040  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_dof)) != 0)) kw_args--;
3041  else {
3042  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 2); __PYX_ERR(0, 163, __pyx_L3_error)
3043  }
3044  case 3:
3045  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_l2g)) != 0)) kw_args--;
3046  else {
3047  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 3); __PYX_ERR(0, 163, __pyx_L3_error)
3048  }
3049  case 4:
3050  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dV_ref)) != 0)) kw_args--;
3051  else {
3052  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 4); __PYX_ERR(0, 163, __pyx_L3_error)
3053  }
3054  case 5:
3055  if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_trial_ref)) != 0)) kw_args--;
3056  else {
3057  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 5); __PYX_ERR(0, 163, __pyx_L3_error)
3058  }
3059  case 6:
3060  if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_trial_ref)) != 0)) kw_args--;
3061  else {
3062  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 6); __PYX_ERR(0, 163, __pyx_L3_error)
3063  }
3064  case 7:
3065  if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_test_ref)) != 0)) kw_args--;
3066  else {
3067  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 7); __PYX_ERR(0, 163, __pyx_L3_error)
3068  }
3069  case 8:
3070  if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_test_ref)) != 0)) kw_args--;
3071  else {
3072  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 8); __PYX_ERR(0, 163, __pyx_L3_error)
3073  }
3074  case 9:
3075  if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
3076  else {
3077  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 9); __PYX_ERR(0, 163, __pyx_L3_error)
3078  }
3079  case 10:
3080  if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
3081  else {
3082  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 10); __PYX_ERR(0, 163, __pyx_L3_error)
3083  }
3084  case 11:
3085  if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_CT_sge)) != 0)) kw_args--;
3086  else {
3087  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 11); __PYX_ERR(0, 163, __pyx_L3_error)
3088  }
3089  case 12:
3090  if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sc_uref)) != 0)) kw_args--;
3091  else {
3092  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 12); __PYX_ERR(0, 163, __pyx_L3_error)
3093  }
3094  case 13:
3095  if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sc_alpha)) != 0)) kw_args--;
3096  else {
3097  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 13); __PYX_ERR(0, 163, __pyx_L3_error)
3098  }
3099  case 14:
3100  if (likely((values[14] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_useMetrics)) != 0)) kw_args--;
3101  else {
3102  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 14); __PYX_ERR(0, 163, __pyx_L3_error)
3103  }
3104  case 15:
3105  if (likely((values[15] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_trial_trace_ref)) != 0)) kw_args--;
3106  else {
3107  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 15); __PYX_ERR(0, 163, __pyx_L3_error)
3108  }
3109  case 16:
3110  if (likely((values[16] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_grad_trial_trace_ref)) != 0)) kw_args--;
3111  else {
3112  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 16); __PYX_ERR(0, 163, __pyx_L3_error)
3113  }
3114  case 17:
3115  if (likely((values[17] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dS_ref)) != 0)) kw_args--;
3116  else {
3117  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 17); __PYX_ERR(0, 163, __pyx_L3_error)
3118  }
3119  case 18:
3120  if (likely((values[18] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_trial_trace_ref)) != 0)) kw_args--;
3121  else {
3122  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 18); __PYX_ERR(0, 163, __pyx_L3_error)
3123  }
3124  case 19:
3125  if (likely((values[19] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_trial_trace_ref)) != 0)) kw_args--;
3126  else {
3127  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 19); __PYX_ERR(0, 163, __pyx_L3_error)
3128  }
3129  case 20:
3130  if (likely((values[20] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_test_trace_ref)) != 0)) kw_args--;
3131  else {
3132  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 20); __PYX_ERR(0, 163, __pyx_L3_error)
3133  }
3134  case 21:
3135  if (likely((values[21] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_test_trace_ref)) != 0)) kw_args--;
3136  else {
3137  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 21); __PYX_ERR(0, 163, __pyx_L3_error)
3138  }
3139  case 22:
3140  if (likely((values[22] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_normal_ref)) != 0)) kw_args--;
3141  else {
3142  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 22); __PYX_ERR(0, 163, __pyx_L3_error)
3143  }
3144  case 23:
3145  if (likely((values[23] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_boundaryJac_ref)) != 0)) kw_args--;
3146  else {
3147  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 23); __PYX_ERR(0, 163, __pyx_L3_error)
3148  }
3149  case 24:
3150  if (likely((values[24] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
3151  else {
3152  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 24); __PYX_ERR(0, 163, __pyx_L3_error)
3153  }
3154  case 25:
3155  if (likely((values[25] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_l2g)) != 0)) kw_args--;
3156  else {
3157  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 25); __PYX_ERR(0, 163, __pyx_L3_error)
3158  }
3159  case 26:
3160  if (likely((values[26] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_dof)) != 0)) kw_args--;
3161  else {
3162  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 26); __PYX_ERR(0, 163, __pyx_L3_error)
3163  }
3164  case 27:
3165  if (likely((values[27] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sdInfo_u_u_rowptr)) != 0)) kw_args--;
3166  else {
3167  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 27); __PYX_ERR(0, 163, __pyx_L3_error)
3168  }
3169  case 28:
3170  if (likely((values[28] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sdInfo_u_u_colind)) != 0)) kw_args--;
3171  else {
3172  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 28); __PYX_ERR(0, 163, __pyx_L3_error)
3173  }
3174  case 29:
3175  if (likely((values[29] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_a)) != 0)) kw_args--;
3176  else {
3177  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 29); __PYX_ERR(0, 163, __pyx_L3_error)
3178  }
3179  case 30:
3180  if (likely((values[30] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_v)) != 0)) kw_args--;
3181  else {
3182  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 30); __PYX_ERR(0, 163, __pyx_L3_error)
3183  }
3184  case 31:
3185  if (likely((values[31] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_r)) != 0)) kw_args--;
3186  else {
3187  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 31); __PYX_ERR(0, 163, __pyx_L3_error)
3188  }
3189  case 32:
3190  if (likely((values[32] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lag_shockCapturing)) != 0)) kw_args--;
3191  else {
3192  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 32); __PYX_ERR(0, 163, __pyx_L3_error)
3193  }
3194  case 33:
3195  if (likely((values[33] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shockCapturingDiffusion)) != 0)) kw_args--;
3196  else {
3197  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 33); __PYX_ERR(0, 163, __pyx_L3_error)
3198  }
3199  case 34:
3200  if (likely((values[34] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_numDiff_u)) != 0)) kw_args--;
3201  else {
3202  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 34); __PYX_ERR(0, 163, __pyx_L3_error)
3203  }
3204  case 35:
3205  if (likely((values[35] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_numDiff_u_last)) != 0)) kw_args--;
3206  else {
3207  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 35); __PYX_ERR(0, 163, __pyx_L3_error)
3208  }
3209  case 36:
3210  if (likely((values[36] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
3211  else {
3212  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 36); __PYX_ERR(0, 163, __pyx_L3_error)
3213  }
3214  case 37:
3215  if (likely((values[37] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
3216  else {
3217  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 37); __PYX_ERR(0, 163, __pyx_L3_error)
3218  }
3219  case 38:
3220  if (likely((values[38] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_globalResidual)) != 0)) kw_args--;
3221  else {
3222  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 38); __PYX_ERR(0, 163, __pyx_L3_error)
3223  }
3224  case 39:
3225  if (likely((values[39] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
3226  else {
3227  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 39); __PYX_ERR(0, 163, __pyx_L3_error)
3228  }
3229  case 40:
3230  if (likely((values[40] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
3231  else {
3232  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 40); __PYX_ERR(0, 163, __pyx_L3_error)
3233  }
3234  case 41:
3235  if (likely((values[41] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
3236  else {
3237  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 41); __PYX_ERR(0, 163, __pyx_L3_error)
3238  }
3239  case 42:
3240  if (likely((values[42] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
3241  else {
3242  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 42); __PYX_ERR(0, 163, __pyx_L3_error)
3243  }
3244  case 43:
3245  if (likely((values[43] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_a)) != 0)) kw_args--;
3246  else {
3247  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 43); __PYX_ERR(0, 163, __pyx_L3_error)
3248  }
3249  case 44:
3250  if (likely((values[44] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_v)) != 0)) kw_args--;
3251  else {
3252  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 44); __PYX_ERR(0, 163, __pyx_L3_error)
3253  }
3254  case 45:
3255  if (likely((values[45] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isDOFBoundary_u)) != 0)) kw_args--;
3256  else {
3257  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 45); __PYX_ERR(0, 163, __pyx_L3_error)
3258  }
3259  case 46:
3260  if (likely((values[46] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_bc_u_ext)) != 0)) kw_args--;
3261  else {
3262  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 46); __PYX_ERR(0, 163, __pyx_L3_error)
3263  }
3264  case 47:
3265  if (likely((values[47] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isFluxBoundary_u)) != 0)) kw_args--;
3266  else {
3267  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 47); __PYX_ERR(0, 163, __pyx_L3_error)
3268  }
3269  case 48:
3270  if (likely((values[48] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isAdvectiveFluxBoundary_u)) != 0)) kw_args--;
3271  else {
3272  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 48); __PYX_ERR(0, 163, __pyx_L3_error)
3273  }
3274  case 49:
3275  if (likely((values[49] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_bc_flux_u_ext)) != 0)) kw_args--;
3276  else {
3277  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 49); __PYX_ERR(0, 163, __pyx_L3_error)
3278  }
3279  case 50:
3280  if (likely((values[50] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_bc_advectiveFlux_u_ext)) != 0)) kw_args--;
3281  else {
3282  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 50); __PYX_ERR(0, 163, __pyx_L3_error)
3283  }
3284  case 51:
3285  if (likely((values[51] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_penalty)) != 0)) kw_args--;
3286  else {
3287  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 51); __PYX_ERR(0, 163, __pyx_L3_error)
3288  }
3289  case 52:
3290  if (likely((values[52] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_adjoint_sigma)) != 0)) kw_args--;
3291  else {
3292  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 52); __PYX_ERR(0, 163, __pyx_L3_error)
3293  }
3294  }
3295  if (unlikely(kw_args > 0)) {
3296  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateResidual") < 0)) __PYX_ERR(0, 163, __pyx_L3_error)
3297  }
3298  } else if (PyTuple_GET_SIZE(__pyx_args) != 53) {
3299  goto __pyx_L5_argtuple_error;
3300  } else {
3301  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3302  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3303  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3304  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3305  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3306  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3307  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3308  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3309  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3310  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3311  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3312  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3313  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3314  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3315  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3316  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3317  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3318  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3319  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3320  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3321  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3322  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3323  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3324  values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3325  values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3326  values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3327  values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3328  values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3329  values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3330  values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3331  values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3332  values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
3333  values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
3334  values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
3335  values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
3336  values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
3337  values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
3338  values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
3339  values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
3340  values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
3341  values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
3342  values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
3343  values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
3344  values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
3345  values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
3346  values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
3347  values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
3348  values[47] = PyTuple_GET_ITEM(__pyx_args, 47);
3349  values[48] = PyTuple_GET_ITEM(__pyx_args, 48);
3350  values[49] = PyTuple_GET_ITEM(__pyx_args, 49);
3351  values[50] = PyTuple_GET_ITEM(__pyx_args, 50);
3352  values[51] = PyTuple_GET_ITEM(__pyx_args, 51);
3353  values[52] = PyTuple_GET_ITEM(__pyx_args, 52);
3354  }
3355  __pyx_v_mesh_trial_ref = ((PyArrayObject *)values[0]);
3356  __pyx_v_mesh_grad_trial_ref = ((PyArrayObject *)values[1]);
3357  __pyx_v_mesh_dof = ((PyArrayObject *)values[2]);
3358  __pyx_v_mesh_l2g = ((PyArrayObject *)values[3]);
3359  __pyx_v_dV_ref = ((PyArrayObject *)values[4]);
3360  __pyx_v_u_trial_ref = ((PyArrayObject *)values[5]);
3361  __pyx_v_u_grad_trial_ref = ((PyArrayObject *)values[6]);
3362  __pyx_v_u_test_ref = ((PyArrayObject *)values[7]);
3363  __pyx_v_u_grad_test_ref = ((PyArrayObject *)values[8]);
3364  __pyx_v_elementDiameter = ((PyArrayObject *)values[9]);
3365  __pyx_v_cfl = ((PyArrayObject *)values[10]);
3366  __pyx_v_CT_sge = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_CT_sge == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error)
3367  __pyx_v_sc_uref = __pyx_PyFloat_AsDouble(values[12]); if (unlikely((__pyx_v_sc_uref == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L3_error)
3368  __pyx_v_sc_alpha = __pyx_PyFloat_AsDouble(values[13]); if (unlikely((__pyx_v_sc_alpha == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 177, __pyx_L3_error)
3369  __pyx_v_useMetrics = __pyx_PyFloat_AsDouble(values[14]); if (unlikely((__pyx_v_useMetrics == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L3_error)
3370  __pyx_v_mesh_trial_trace_ref = ((PyArrayObject *)values[15]);
3371  __pyx_v_mesh_grad_trial_trace_ref = ((PyArrayObject *)values[16]);
3372  __pyx_v_dS_ref = ((PyArrayObject *)values[17]);
3373  __pyx_v_u_trial_trace_ref = ((PyArrayObject *)values[18]);
3374  __pyx_v_u_grad_trial_trace_ref = ((PyArrayObject *)values[19]);
3375  __pyx_v_u_test_trace_ref = ((PyArrayObject *)values[20]);
3376  __pyx_v_u_grad_test_trace_ref = ((PyArrayObject *)values[21]);
3377  __pyx_v_normal_ref = ((PyArrayObject *)values[22]);
3378  __pyx_v_boundaryJac_ref = ((PyArrayObject *)values[23]);
3379  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[24]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error)
3380  __pyx_v_u_l2g = ((PyArrayObject *)values[25]);
3381  __pyx_v_u_dof = ((PyArrayObject *)values[26]);
3382  __pyx_v_sdInfo_u_u_rowptr = ((PyArrayObject *)values[27]);
3383  __pyx_v_sdInfo_u_u_colind = ((PyArrayObject *)values[28]);
3384  __pyx_v_q_a = ((PyArrayObject *)values[29]);
3385  __pyx_v_q_v = ((PyArrayObject *)values[30]);
3386  __pyx_v_q_r = ((PyArrayObject *)values[31]);
3387  __pyx_v_lag_shockCapturing = __Pyx_PyInt_As_int(values[32]); if (unlikely((__pyx_v_lag_shockCapturing == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 196, __pyx_L3_error)
3388  __pyx_v_shockCapturingDiffusion = __pyx_PyFloat_AsDouble(values[33]); if (unlikely((__pyx_v_shockCapturingDiffusion == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 197, __pyx_L3_error)
3389  __pyx_v_q_numDiff_u = ((PyArrayObject *)values[34]);
3390  __pyx_v_q_numDiff_u_last = ((PyArrayObject *)values[35]);
3391  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[36]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 200, __pyx_L3_error)
3392  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[37]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L3_error)
3393  __pyx_v_globalResidual = ((PyArrayObject *)values[38]);
3394  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[39]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 203, __pyx_L3_error)
3395  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[40]);
3396  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[41]);
3397  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[42]);
3398  __pyx_v_ebqe_a = ((PyArrayObject *)values[43]);
3399  __pyx_v_ebqe_v = ((PyArrayObject *)values[44]);
3400  __pyx_v_isDOFBoundary_u = ((PyArrayObject *)values[45]);
3401  __pyx_v_ebqe_bc_u_ext = ((PyArrayObject *)values[46]);
3402  __pyx_v_isFluxBoundary_u = ((PyArrayObject *)values[47]);
3403  __pyx_v_isAdvectiveFluxBoundary_u = ((PyArrayObject *)values[48]);
3404  __pyx_v_ebqe_bc_flux_u_ext = ((PyArrayObject *)values[49]);
3405  __pyx_v_ebqe_bc_advectiveFlux_u_ext = ((PyArrayObject *)values[50]);
3406  __pyx_v_ebqe_penalty = ((PyArrayObject *)values[51]);
3407  __pyx_v_adjoint_sigma = __pyx_PyFloat_AsDouble(values[52]); if (unlikely((__pyx_v_adjoint_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L3_error)
3408  }
3409  goto __pyx_L4_argument_unpacking_done;
3410  __pyx_L5_argtuple_error:;
3411  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 163, __pyx_L3_error)
3412  __pyx_L3_error:;
3413  __Pyx_AddTraceback("ADR.ADR.calculateResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
3414  __Pyx_RefNannyFinishContext();
3415  return NULL;
3416  __pyx_L4_argument_unpacking_done:;
3417  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_trial_ref", 0))) __PYX_ERR(0, 164, __pyx_L1_error)
3418  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_grad_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_grad_trial_ref", 0))) __PYX_ERR(0, 165, __pyx_L1_error)
3419  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_dof), __pyx_ptype_5numpy_ndarray, 1, "mesh_dof", 0))) __PYX_ERR(0, 166, __pyx_L1_error)
3420  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_l2g), __pyx_ptype_5numpy_ndarray, 1, "mesh_l2g", 0))) __PYX_ERR(0, 167, __pyx_L1_error)
3421  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dV_ref), __pyx_ptype_5numpy_ndarray, 1, "dV_ref", 0))) __PYX_ERR(0, 168, __pyx_L1_error)
3422  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "u_trial_ref", 0))) __PYX_ERR(0, 169, __pyx_L1_error)
3423  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_trial_ref", 0))) __PYX_ERR(0, 170, __pyx_L1_error)
3424  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_test_ref), __pyx_ptype_5numpy_ndarray, 1, "u_test_ref", 0))) __PYX_ERR(0, 171, __pyx_L1_error)
3425  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_test_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_test_ref", 0))) __PYX_ERR(0, 172, __pyx_L1_error)
3426  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1, "elementDiameter", 0))) __PYX_ERR(0, 173, __pyx_L1_error)
3427  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1, "cfl", 0))) __PYX_ERR(0, 174, __pyx_L1_error)
3428  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_trial_trace_ref", 0))) __PYX_ERR(0, 179, __pyx_L1_error)
3429  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_grad_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_grad_trial_trace_ref", 0))) __PYX_ERR(0, 180, __pyx_L1_error)
3430  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS_ref), __pyx_ptype_5numpy_ndarray, 1, "dS_ref", 0))) __PYX_ERR(0, 181, __pyx_L1_error)
3431  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_trial_trace_ref", 0))) __PYX_ERR(0, 182, __pyx_L1_error)
3432  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_trial_trace_ref", 0))) __PYX_ERR(0, 183, __pyx_L1_error)
3433  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_test_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_test_trace_ref", 0))) __PYX_ERR(0, 184, __pyx_L1_error)
3434  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_test_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_test_trace_ref", 0))) __PYX_ERR(0, 185, __pyx_L1_error)
3435  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normal_ref), __pyx_ptype_5numpy_ndarray, 1, "normal_ref", 0))) __PYX_ERR(0, 186, __pyx_L1_error)
3436  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_boundaryJac_ref), __pyx_ptype_5numpy_ndarray, 1, "boundaryJac_ref", 0))) __PYX_ERR(0, 187, __pyx_L1_error)
3437  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_l2g), __pyx_ptype_5numpy_ndarray, 1, "u_l2g", 0))) __PYX_ERR(0, 189, __pyx_L1_error)
3438  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_dof), __pyx_ptype_5numpy_ndarray, 1, "u_dof", 0))) __PYX_ERR(0, 190, __pyx_L1_error)
3439  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sdInfo_u_u_rowptr), __pyx_ptype_5numpy_ndarray, 1, "sdInfo_u_u_rowptr", 0))) __PYX_ERR(0, 191, __pyx_L1_error)
3440  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sdInfo_u_u_colind), __pyx_ptype_5numpy_ndarray, 1, "sdInfo_u_u_colind", 0))) __PYX_ERR(0, 192, __pyx_L1_error)
3441  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_a), __pyx_ptype_5numpy_ndarray, 1, "q_a", 0))) __PYX_ERR(0, 193, __pyx_L1_error)
3442  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_v), __pyx_ptype_5numpy_ndarray, 1, "q_v", 0))) __PYX_ERR(0, 194, __pyx_L1_error)
3443  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_r), __pyx_ptype_5numpy_ndarray, 1, "q_r", 0))) __PYX_ERR(0, 195, __pyx_L1_error)
3444  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_numDiff_u), __pyx_ptype_5numpy_ndarray, 1, "q_numDiff_u", 0))) __PYX_ERR(0, 198, __pyx_L1_error)
3445  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_numDiff_u_last), __pyx_ptype_5numpy_ndarray, 1, "q_numDiff_u_last", 0))) __PYX_ERR(0, 199, __pyx_L1_error)
3446  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_globalResidual), __pyx_ptype_5numpy_ndarray, 1, "globalResidual", 0))) __PYX_ERR(0, 202, __pyx_L1_error)
3447  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 204, __pyx_L1_error)
3448  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 205, __pyx_L1_error)
3449  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 206, __pyx_L1_error)
3450  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_a), __pyx_ptype_5numpy_ndarray, 1, "ebqe_a", 0))) __PYX_ERR(0, 207, __pyx_L1_error)
3451  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_v), __pyx_ptype_5numpy_ndarray, 1, "ebqe_v", 0))) __PYX_ERR(0, 208, __pyx_L1_error)
3452  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isDOFBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isDOFBoundary_u", 0))) __PYX_ERR(0, 209, __pyx_L1_error)
3453  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_u_ext", 0))) __PYX_ERR(0, 210, __pyx_L1_error)
3454  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isFluxBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isFluxBoundary_u", 0))) __PYX_ERR(0, 211, __pyx_L1_error)
3455  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isAdvectiveFluxBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isAdvectiveFluxBoundary_u", 0))) __PYX_ERR(0, 212, __pyx_L1_error)
3456  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_flux_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_flux_u_ext", 0))) __PYX_ERR(0, 213, __pyx_L1_error)
3457  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_advectiveFlux_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_advectiveFlux_u_ext", 0))) __PYX_ERR(0, 214, __pyx_L1_error)
3458  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_penalty), __pyx_ptype_5numpy_ndarray, 1, "ebqe_penalty", 0))) __PYX_ERR(0, 215, __pyx_L1_error)
3459  __pyx_r = __pyx_pf_3ADR_3ADR_4calculateResidual(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self), __pyx_v_mesh_trial_ref, __pyx_v_mesh_grad_trial_ref, __pyx_v_mesh_dof, __pyx_v_mesh_l2g, __pyx_v_dV_ref, __pyx_v_u_trial_ref, __pyx_v_u_grad_trial_ref, __pyx_v_u_test_ref, __pyx_v_u_grad_test_ref, __pyx_v_elementDiameter, __pyx_v_cfl, __pyx_v_CT_sge, __pyx_v_sc_uref, __pyx_v_sc_alpha, __pyx_v_useMetrics, __pyx_v_mesh_trial_trace_ref, __pyx_v_mesh_grad_trial_trace_ref, __pyx_v_dS_ref, __pyx_v_u_trial_trace_ref, __pyx_v_u_grad_trial_trace_ref, __pyx_v_u_test_trace_ref, __pyx_v_u_grad_test_trace_ref, __pyx_v_normal_ref, __pyx_v_boundaryJac_ref, __pyx_v_nElements_global, __pyx_v_u_l2g, __pyx_v_u_dof, __pyx_v_sdInfo_u_u_rowptr, __pyx_v_sdInfo_u_u_colind, __pyx_v_q_a, __pyx_v_q_v, __pyx_v_q_r, __pyx_v_lag_shockCapturing, __pyx_v_shockCapturingDiffusion, __pyx_v_q_numDiff_u, __pyx_v_q_numDiff_u_last, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_globalResidual, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_ebqe_a, __pyx_v_ebqe_v, __pyx_v_isDOFBoundary_u, __pyx_v_ebqe_bc_u_ext, __pyx_v_isFluxBoundary_u, __pyx_v_isAdvectiveFluxBoundary_u, __pyx_v_ebqe_bc_flux_u_ext, __pyx_v_ebqe_bc_advectiveFlux_u_ext, __pyx_v_ebqe_penalty, __pyx_v_adjoint_sigma);
3460 
3461  /* function exit code */
3462  goto __pyx_L0;
3463  __pyx_L1_error:;
3464  __pyx_r = NULL;
3465  __pyx_L0:;
3466  __Pyx_RefNannyFinishContext();
3467  return __pyx_r;
3468 }
3469 
3470 static PyObject *__pyx_pf_3ADR_3ADR_4calculateResidual(struct __pyx_obj_3ADR_ADR *__pyx_v_self, PyArrayObject *__pyx_v_mesh_trial_ref, PyArrayObject *__pyx_v_mesh_grad_trial_ref, PyArrayObject *__pyx_v_mesh_dof, PyArrayObject *__pyx_v_mesh_l2g, PyArrayObject *__pyx_v_dV_ref, PyArrayObject *__pyx_v_u_trial_ref, PyArrayObject *__pyx_v_u_grad_trial_ref, PyArrayObject *__pyx_v_u_test_ref, PyArrayObject *__pyx_v_u_grad_test_ref, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_cfl, double __pyx_v_CT_sge, double __pyx_v_sc_uref, double __pyx_v_sc_alpha, double __pyx_v_useMetrics, PyArrayObject *__pyx_v_mesh_trial_trace_ref, PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref, PyArrayObject *__pyx_v_dS_ref, PyArrayObject *__pyx_v_u_trial_trace_ref, PyArrayObject *__pyx_v_u_grad_trial_trace_ref, PyArrayObject *__pyx_v_u_test_trace_ref, PyArrayObject *__pyx_v_u_grad_test_trace_ref, PyArrayObject *__pyx_v_normal_ref, PyArrayObject *__pyx_v_boundaryJac_ref, int __pyx_v_nElements_global, PyArrayObject *__pyx_v_u_l2g, PyArrayObject *__pyx_v_u_dof, PyArrayObject *__pyx_v_sdInfo_u_u_rowptr, PyArrayObject *__pyx_v_sdInfo_u_u_colind, PyArrayObject *__pyx_v_q_a, PyArrayObject *__pyx_v_q_v, PyArrayObject *__pyx_v_q_r, int __pyx_v_lag_shockCapturing, double __pyx_v_shockCapturingDiffusion, PyArrayObject *__pyx_v_q_numDiff_u, PyArrayObject *__pyx_v_q_numDiff_u_last, int __pyx_v_offset_u, int __pyx_v_stride_u, PyArrayObject *__pyx_v_globalResidual, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebqe_a, PyArrayObject *__pyx_v_ebqe_v, PyArrayObject *__pyx_v_isDOFBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_u_ext, PyArrayObject *__pyx_v_isFluxBoundary_u, PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext, PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext, PyArrayObject *__pyx_v_ebqe_penalty, double __pyx_v_adjoint_sigma) {
3471  PyObject *__pyx_r = NULL;
3472  __Pyx_RefNannyDeclarations
3473  __Pyx_RefNannySetupContext("calculateResidual", 0);
3474 
3475  /* "ADR.pyx":217
3476  * numpy.ndarray ebqe_penalty,
3477  * double adjoint_sigma):
3478  * self.thisptr.calculateResidual(<double*> mesh_trial_ref.data, # <<<<<<<<<<<<<<
3479  * <double*> mesh_grad_trial_ref.data,
3480  * <double*> mesh_dof.data,
3481  */
3482  __pyx_v_self->thisptr->calculateResidual(((double *)__pyx_v_mesh_trial_ref->data), ((double *)__pyx_v_mesh_grad_trial_ref->data), ((double *)__pyx_v_mesh_dof->data), ((int *)__pyx_v_mesh_l2g->data), ((double *)__pyx_v_dV_ref->data), ((double *)__pyx_v_u_trial_ref->data), ((double *)__pyx_v_u_grad_trial_ref->data), ((double *)__pyx_v_u_test_ref->data), ((double *)__pyx_v_u_grad_test_ref->data), ((double *)__pyx_v_elementDiameter->data), ((double *)__pyx_v_cfl->data), __pyx_v_CT_sge, __pyx_v_sc_uref, __pyx_v_sc_alpha, __pyx_v_useMetrics, ((double *)__pyx_v_mesh_trial_trace_ref->data), ((double *)__pyx_v_mesh_grad_trial_trace_ref->data), ((double *)__pyx_v_dS_ref->data), ((double *)__pyx_v_u_trial_trace_ref->data), ((double *)__pyx_v_u_grad_trial_trace_ref->data), ((double *)__pyx_v_u_test_trace_ref->data), ((double *)__pyx_v_u_grad_test_trace_ref->data), ((double *)__pyx_v_normal_ref->data), ((double *)__pyx_v_boundaryJac_ref->data), __pyx_v_nElements_global, ((int *)__pyx_v_u_l2g->data), ((double *)__pyx_v_u_dof->data), ((int *)__pyx_v_sdInfo_u_u_rowptr->data), ((int *)__pyx_v_sdInfo_u_u_colind->data), ((double *)__pyx_v_q_a->data), ((double *)__pyx_v_q_v->data), ((double *)__pyx_v_q_r->data), __pyx_v_lag_shockCapturing, __pyx_v_shockCapturingDiffusion, ((double *)__pyx_v_q_numDiff_u->data), ((double *)__pyx_v_q_numDiff_u_last->data), __pyx_v_offset_u, __pyx_v_stride_u, ((double *)__pyx_v_globalResidual->data), __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_ebqe_a->data), ((double *)__pyx_v_ebqe_v->data), ((int *)__pyx_v_isDOFBoundary_u->data), ((double *)__pyx_v_ebqe_bc_u_ext->data), ((int *)__pyx_v_isFluxBoundary_u->data), ((int *)__pyx_v_isAdvectiveFluxBoundary_u->data), ((double *)__pyx_v_ebqe_bc_flux_u_ext->data), ((double *)__pyx_v_ebqe_bc_advectiveFlux_u_ext->data), ((double *)__pyx_v_ebqe_penalty->data), __pyx_v_adjoint_sigma);
3483 
3484  /* "ADR.pyx":163
3485  * def __dealloc__(self):
3486  * del self.thisptr
3487  * def calculateResidual(self, # <<<<<<<<<<<<<<
3488  * numpy.ndarray mesh_trial_ref,
3489  * numpy.ndarray mesh_grad_trial_ref,
3490  */
3491 
3492  /* function exit code */
3493  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3494  __Pyx_XGIVEREF(__pyx_r);
3495  __Pyx_RefNannyFinishContext();
3496  return __pyx_r;
3497 }
3498 
3499 /* "ADR.pyx":270
3500  * <double*> ebqe_penalty.data,
3501  * adjoint_sigma)
3502  * def calculateJacobian(self, # <<<<<<<<<<<<<<
3503  * numpy.ndarray mesh_trial_ref,
3504  * numpy.ndarray mesh_grad_trial_ref,
3505  */
3506 
3507 /* Python wrapper */
3508 static PyObject *__pyx_pw_3ADR_3ADR_7calculateJacobian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3509 static char __pyx_doc_3ADR_3ADR_6calculateJacobian[] = "\n Optimized jacobian calculation\n ";
3510 static PyObject *__pyx_pw_3ADR_3ADR_7calculateJacobian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3511  PyArrayObject *__pyx_v_mesh_trial_ref = 0;
3512  PyArrayObject *__pyx_v_mesh_grad_trial_ref = 0;
3513  PyArrayObject *__pyx_v_mesh_dof = 0;
3514  PyArrayObject *__pyx_v_mesh_l2g = 0;
3515  PyArrayObject *__pyx_v_dV_ref = 0;
3516  PyArrayObject *__pyx_v_u_trial_ref = 0;
3517  PyArrayObject *__pyx_v_u_grad_trial_ref = 0;
3518  PyArrayObject *__pyx_v_u_test_ref = 0;
3519  PyArrayObject *__pyx_v_u_grad_test_ref = 0;
3520  PyArrayObject *__pyx_v_elementDiameter = 0;
3521  PyArrayObject *__pyx_v_cfl = 0;
3522  double __pyx_v_CT_sge;
3523  double __pyx_v_sc_uref;
3524  double __pyx_v_sc_alpha;
3525  double __pyx_v_useMetrics;
3526  PyArrayObject *__pyx_v_mesh_trial_trace_ref = 0;
3527  PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref = 0;
3528  PyArrayObject *__pyx_v_dS_ref = 0;
3529  PyArrayObject *__pyx_v_u_trial_trace_ref = 0;
3530  PyArrayObject *__pyx_v_u_grad_trial_trace_ref = 0;
3531  PyArrayObject *__pyx_v_u_test_trace_ref = 0;
3532  PyArrayObject *__pyx_v_u_grad_test_trace_ref = 0;
3533  PyArrayObject *__pyx_v_normal_ref = 0;
3534  PyArrayObject *__pyx_v_boundaryJac_ref = 0;
3535  int __pyx_v_nElements_global;
3536  PyArrayObject *__pyx_v_u_l2g = 0;
3537  PyArrayObject *__pyx_v_u_dof = 0;
3538  PyArrayObject *__pyx_v_sdInfo_u_u_rowptr = 0;
3539  PyArrayObject *__pyx_v_sdInfo_u_u_colind = 0;
3540  PyArrayObject *__pyx_v_q_a = 0;
3541  PyArrayObject *__pyx_v_q_v = 0;
3542  PyArrayObject *__pyx_v_q_r = 0;
3543  int __pyx_v_lag_shockCapturing;
3544  double __pyx_v_shockCapturingDiffusion;
3545  PyArrayObject *__pyx_v_q_numDiff_u = 0;
3546  PyArrayObject *__pyx_v_q_numDiff_u_last = 0;
3547  PyArrayObject *__pyx_v_csrRowIndeces_u_u = 0;
3548  PyArrayObject *__pyx_v_csrColumnOffsets_u_u = 0;
3549  PyObject *__pyx_v_globalJacobian = 0;
3550  int __pyx_v_nExteriorElementBoundaries_global;
3551  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
3552  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
3553  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
3554  PyArrayObject *__pyx_v_ebqe_a = 0;
3555  PyArrayObject *__pyx_v_ebqe_v = 0;
3556  PyArrayObject *__pyx_v_isDOFBoundary_u = 0;
3557  PyArrayObject *__pyx_v_ebqe_bc_u_ext = 0;
3558  PyArrayObject *__pyx_v_isFluxBoundary_u = 0;
3559  PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u = 0;
3560  PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext = 0;
3561  PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext = 0;
3562  PyArrayObject *__pyx_v_csrColumnOffsets_eb_u_u = 0;
3563  PyArrayObject *__pyx_v_ebqe_penalty = 0;
3564  double __pyx_v_adjoint_sigma;
3565  PyObject *__pyx_r = 0;
3566  __Pyx_RefNannyDeclarations
3567  __Pyx_RefNannySetupContext("calculateJacobian (wrapper)", 0);
3568  {
3569  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mesh_trial_ref,&__pyx_n_s_mesh_grad_trial_ref,&__pyx_n_s_mesh_dof,&__pyx_n_s_mesh_l2g,&__pyx_n_s_dV_ref,&__pyx_n_s_u_trial_ref,&__pyx_n_s_u_grad_trial_ref,&__pyx_n_s_u_test_ref,&__pyx_n_s_u_grad_test_ref,&__pyx_n_s_elementDiameter,&__pyx_n_s_cfl,&__pyx_n_s_CT_sge,&__pyx_n_s_sc_uref,&__pyx_n_s_sc_alpha,&__pyx_n_s_useMetrics,&__pyx_n_s_mesh_trial_trace_ref,&__pyx_n_s_mesh_grad_trial_trace_ref,&__pyx_n_s_dS_ref,&__pyx_n_s_u_trial_trace_ref,&__pyx_n_s_u_grad_trial_trace_ref,&__pyx_n_s_u_test_trace_ref,&__pyx_n_s_u_grad_test_trace_ref,&__pyx_n_s_normal_ref,&__pyx_n_s_boundaryJac_ref,&__pyx_n_s_nElements_global,&__pyx_n_s_u_l2g,&__pyx_n_s_u_dof,&__pyx_n_s_sdInfo_u_u_rowptr,&__pyx_n_s_sdInfo_u_u_colind,&__pyx_n_s_q_a,&__pyx_n_s_q_v,&__pyx_n_s_q_r,&__pyx_n_s_lag_shockCapturing,&__pyx_n_s_shockCapturingDiffusion,&__pyx_n_s_q_numDiff_u,&__pyx_n_s_q_numDiff_u_last,&__pyx_n_s_csrRowIndeces_u_u,&__pyx_n_s_csrColumnOffsets_u_u,&__pyx_n_s_globalJacobian,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_ebqe_a,&__pyx_n_s_ebqe_v,&__pyx_n_s_isDOFBoundary_u,&__pyx_n_s_ebqe_bc_u_ext,&__pyx_n_s_isFluxBoundary_u,&__pyx_n_s_isAdvectiveFluxBoundary_u,&__pyx_n_s_ebqe_bc_flux_u_ext,&__pyx_n_s_ebqe_bc_advectiveFlux_u_ext,&__pyx_n_s_csrColumnOffsets_eb_u_u,&__pyx_n_s_ebqe_penalty,&__pyx_n_s_adjoint_sigma,0};
3570  PyObject* values[54] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
3571  if (unlikely(__pyx_kwds)) {
3572  Py_ssize_t kw_args;
3573  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3574  switch (pos_args) {
3575  case 54: values[53] = PyTuple_GET_ITEM(__pyx_args, 53);
3576  case 53: values[52] = PyTuple_GET_ITEM(__pyx_args, 52);
3577  case 52: values[51] = PyTuple_GET_ITEM(__pyx_args, 51);
3578  case 51: values[50] = PyTuple_GET_ITEM(__pyx_args, 50);
3579  case 50: values[49] = PyTuple_GET_ITEM(__pyx_args, 49);
3580  case 49: values[48] = PyTuple_GET_ITEM(__pyx_args, 48);
3581  case 48: values[47] = PyTuple_GET_ITEM(__pyx_args, 47);
3582  case 47: values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
3583  case 46: values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
3584  case 45: values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
3585  case 44: values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
3586  case 43: values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
3587  case 42: values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
3588  case 41: values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
3589  case 40: values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
3590  case 39: values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
3591  case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
3592  case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
3593  case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
3594  case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
3595  case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
3596  case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
3597  case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
3598  case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3599  case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3600  case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3601  case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3602  case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3603  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3604  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3605  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3606  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3607  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3608  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3609  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3610  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3611  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3612  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3613  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3614  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3615  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3616  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3617  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3618  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3619  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3620  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3621  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3622  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3623  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3624  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3625  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3626  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3627  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3628  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3629  case 0: break;
3630  default: goto __pyx_L5_argtuple_error;
3631  }
3632  kw_args = PyDict_Size(__pyx_kwds);
3633  switch (pos_args) {
3634  case 0:
3635  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_trial_ref)) != 0)) kw_args--;
3636  else goto __pyx_L5_argtuple_error;
3637  case 1:
3638  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_grad_trial_ref)) != 0)) kw_args--;
3639  else {
3640  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 1); __PYX_ERR(0, 270, __pyx_L3_error)
3641  }
3642  case 2:
3643  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_dof)) != 0)) kw_args--;
3644  else {
3645  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 2); __PYX_ERR(0, 270, __pyx_L3_error)
3646  }
3647  case 3:
3648  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_l2g)) != 0)) kw_args--;
3649  else {
3650  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 3); __PYX_ERR(0, 270, __pyx_L3_error)
3651  }
3652  case 4:
3653  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dV_ref)) != 0)) kw_args--;
3654  else {
3655  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 4); __PYX_ERR(0, 270, __pyx_L3_error)
3656  }
3657  case 5:
3658  if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_trial_ref)) != 0)) kw_args--;
3659  else {
3660  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 5); __PYX_ERR(0, 270, __pyx_L3_error)
3661  }
3662  case 6:
3663  if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_trial_ref)) != 0)) kw_args--;
3664  else {
3665  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 6); __PYX_ERR(0, 270, __pyx_L3_error)
3666  }
3667  case 7:
3668  if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_test_ref)) != 0)) kw_args--;
3669  else {
3670  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 7); __PYX_ERR(0, 270, __pyx_L3_error)
3671  }
3672  case 8:
3673  if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_test_ref)) != 0)) kw_args--;
3674  else {
3675  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 8); __PYX_ERR(0, 270, __pyx_L3_error)
3676  }
3677  case 9:
3678  if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
3679  else {
3680  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 9); __PYX_ERR(0, 270, __pyx_L3_error)
3681  }
3682  case 10:
3683  if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
3684  else {
3685  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 10); __PYX_ERR(0, 270, __pyx_L3_error)
3686  }
3687  case 11:
3688  if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_CT_sge)) != 0)) kw_args--;
3689  else {
3690  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 11); __PYX_ERR(0, 270, __pyx_L3_error)
3691  }
3692  case 12:
3693  if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sc_uref)) != 0)) kw_args--;
3694  else {
3695  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 12); __PYX_ERR(0, 270, __pyx_L3_error)
3696  }
3697  case 13:
3698  if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sc_alpha)) != 0)) kw_args--;
3699  else {
3700  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 13); __PYX_ERR(0, 270, __pyx_L3_error)
3701  }
3702  case 14:
3703  if (likely((values[14] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_useMetrics)) != 0)) kw_args--;
3704  else {
3705  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 14); __PYX_ERR(0, 270, __pyx_L3_error)
3706  }
3707  case 15:
3708  if (likely((values[15] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_trial_trace_ref)) != 0)) kw_args--;
3709  else {
3710  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 15); __PYX_ERR(0, 270, __pyx_L3_error)
3711  }
3712  case 16:
3713  if (likely((values[16] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_grad_trial_trace_ref)) != 0)) kw_args--;
3714  else {
3715  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 16); __PYX_ERR(0, 270, __pyx_L3_error)
3716  }
3717  case 17:
3718  if (likely((values[17] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dS_ref)) != 0)) kw_args--;
3719  else {
3720  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 17); __PYX_ERR(0, 270, __pyx_L3_error)
3721  }
3722  case 18:
3723  if (likely((values[18] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_trial_trace_ref)) != 0)) kw_args--;
3724  else {
3725  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 18); __PYX_ERR(0, 270, __pyx_L3_error)
3726  }
3727  case 19:
3728  if (likely((values[19] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_trial_trace_ref)) != 0)) kw_args--;
3729  else {
3730  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 19); __PYX_ERR(0, 270, __pyx_L3_error)
3731  }
3732  case 20:
3733  if (likely((values[20] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_test_trace_ref)) != 0)) kw_args--;
3734  else {
3735  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 20); __PYX_ERR(0, 270, __pyx_L3_error)
3736  }
3737  case 21:
3738  if (likely((values[21] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_test_trace_ref)) != 0)) kw_args--;
3739  else {
3740  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 21); __PYX_ERR(0, 270, __pyx_L3_error)
3741  }
3742  case 22:
3743  if (likely((values[22] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_normal_ref)) != 0)) kw_args--;
3744  else {
3745  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 22); __PYX_ERR(0, 270, __pyx_L3_error)
3746  }
3747  case 23:
3748  if (likely((values[23] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_boundaryJac_ref)) != 0)) kw_args--;
3749  else {
3750  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 23); __PYX_ERR(0, 270, __pyx_L3_error)
3751  }
3752  case 24:
3753  if (likely((values[24] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
3754  else {
3755  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 24); __PYX_ERR(0, 270, __pyx_L3_error)
3756  }
3757  case 25:
3758  if (likely((values[25] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_l2g)) != 0)) kw_args--;
3759  else {
3760  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 25); __PYX_ERR(0, 270, __pyx_L3_error)
3761  }
3762  case 26:
3763  if (likely((values[26] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_dof)) != 0)) kw_args--;
3764  else {
3765  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 26); __PYX_ERR(0, 270, __pyx_L3_error)
3766  }
3767  case 27:
3768  if (likely((values[27] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sdInfo_u_u_rowptr)) != 0)) kw_args--;
3769  else {
3770  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 27); __PYX_ERR(0, 270, __pyx_L3_error)
3771  }
3772  case 28:
3773  if (likely((values[28] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sdInfo_u_u_colind)) != 0)) kw_args--;
3774  else {
3775  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 28); __PYX_ERR(0, 270, __pyx_L3_error)
3776  }
3777  case 29:
3778  if (likely((values[29] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_a)) != 0)) kw_args--;
3779  else {
3780  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 29); __PYX_ERR(0, 270, __pyx_L3_error)
3781  }
3782  case 30:
3783  if (likely((values[30] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_v)) != 0)) kw_args--;
3784  else {
3785  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 30); __PYX_ERR(0, 270, __pyx_L3_error)
3786  }
3787  case 31:
3788  if (likely((values[31] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_r)) != 0)) kw_args--;
3789  else {
3790  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 31); __PYX_ERR(0, 270, __pyx_L3_error)
3791  }
3792  case 32:
3793  if (likely((values[32] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lag_shockCapturing)) != 0)) kw_args--;
3794  else {
3795  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 32); __PYX_ERR(0, 270, __pyx_L3_error)
3796  }
3797  case 33:
3798  if (likely((values[33] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shockCapturingDiffusion)) != 0)) kw_args--;
3799  else {
3800  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 33); __PYX_ERR(0, 270, __pyx_L3_error)
3801  }
3802  case 34:
3803  if (likely((values[34] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_numDiff_u)) != 0)) kw_args--;
3804  else {
3805  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 34); __PYX_ERR(0, 270, __pyx_L3_error)
3806  }
3807  case 35:
3808  if (likely((values[35] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_numDiff_u_last)) != 0)) kw_args--;
3809  else {
3810  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 35); __PYX_ERR(0, 270, __pyx_L3_error)
3811  }
3812  case 36:
3813  if (likely((values[36] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_csrRowIndeces_u_u)) != 0)) kw_args--;
3814  else {
3815  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 36); __PYX_ERR(0, 270, __pyx_L3_error)
3816  }
3817  case 37:
3818  if (likely((values[37] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_csrColumnOffsets_u_u)) != 0)) kw_args--;
3819  else {
3820  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 37); __PYX_ERR(0, 270, __pyx_L3_error)
3821  }
3822  case 38:
3823  if (likely((values[38] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_globalJacobian)) != 0)) kw_args--;
3824  else {
3825  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 38); __PYX_ERR(0, 270, __pyx_L3_error)
3826  }
3827  case 39:
3828  if (likely((values[39] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
3829  else {
3830  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 39); __PYX_ERR(0, 270, __pyx_L3_error)
3831  }
3832  case 40:
3833  if (likely((values[40] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
3834  else {
3835  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 40); __PYX_ERR(0, 270, __pyx_L3_error)
3836  }
3837  case 41:
3838  if (likely((values[41] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
3839  else {
3840  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 41); __PYX_ERR(0, 270, __pyx_L3_error)
3841  }
3842  case 42:
3843  if (likely((values[42] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
3844  else {
3845  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 42); __PYX_ERR(0, 270, __pyx_L3_error)
3846  }
3847  case 43:
3848  if (likely((values[43] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_a)) != 0)) kw_args--;
3849  else {
3850  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 43); __PYX_ERR(0, 270, __pyx_L3_error)
3851  }
3852  case 44:
3853  if (likely((values[44] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_v)) != 0)) kw_args--;
3854  else {
3855  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 44); __PYX_ERR(0, 270, __pyx_L3_error)
3856  }
3857  case 45:
3858  if (likely((values[45] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isDOFBoundary_u)) != 0)) kw_args--;
3859  else {
3860  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 45); __PYX_ERR(0, 270, __pyx_L3_error)
3861  }
3862  case 46:
3863  if (likely((values[46] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_bc_u_ext)) != 0)) kw_args--;
3864  else {
3865  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 46); __PYX_ERR(0, 270, __pyx_L3_error)
3866  }
3867  case 47:
3868  if (likely((values[47] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isFluxBoundary_u)) != 0)) kw_args--;
3869  else {
3870  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 47); __PYX_ERR(0, 270, __pyx_L3_error)
3871  }
3872  case 48:
3873  if (likely((values[48] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isAdvectiveFluxBoundary_u)) != 0)) kw_args--;
3874  else {
3875  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 48); __PYX_ERR(0, 270, __pyx_L3_error)
3876  }
3877  case 49:
3878  if (likely((values[49] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_bc_flux_u_ext)) != 0)) kw_args--;
3879  else {
3880  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 49); __PYX_ERR(0, 270, __pyx_L3_error)
3881  }
3882  case 50:
3883  if (likely((values[50] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_bc_advectiveFlux_u_ext)) != 0)) kw_args--;
3884  else {
3885  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 50); __PYX_ERR(0, 270, __pyx_L3_error)
3886  }
3887  case 51:
3888  if (likely((values[51] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_u_u)) != 0)) kw_args--;
3889  else {
3890  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 51); __PYX_ERR(0, 270, __pyx_L3_error)
3891  }
3892  case 52:
3893  if (likely((values[52] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_penalty)) != 0)) kw_args--;
3894  else {
3895  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 52); __PYX_ERR(0, 270, __pyx_L3_error)
3896  }
3897  case 53:
3898  if (likely((values[53] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_adjoint_sigma)) != 0)) kw_args--;
3899  else {
3900  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 53); __PYX_ERR(0, 270, __pyx_L3_error)
3901  }
3902  }
3903  if (unlikely(kw_args > 0)) {
3904  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateJacobian") < 0)) __PYX_ERR(0, 270, __pyx_L3_error)
3905  }
3906  } else if (PyTuple_GET_SIZE(__pyx_args) != 54) {
3907  goto __pyx_L5_argtuple_error;
3908  } else {
3909  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3910  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3911  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3912  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3913  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3914  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3915  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3916  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3917  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3918  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3919  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3920  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3921  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3922  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3923  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3924  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3925  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3926  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3927  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3928  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3929  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3930  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3931  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3932  values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3933  values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3934  values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3935  values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3936  values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3937  values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3938  values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3939  values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3940  values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
3941  values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
3942  values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
3943  values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
3944  values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
3945  values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
3946  values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
3947  values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
3948  values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
3949  values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
3950  values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
3951  values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
3952  values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
3953  values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
3954  values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
3955  values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
3956  values[47] = PyTuple_GET_ITEM(__pyx_args, 47);
3957  values[48] = PyTuple_GET_ITEM(__pyx_args, 48);
3958  values[49] = PyTuple_GET_ITEM(__pyx_args, 49);
3959  values[50] = PyTuple_GET_ITEM(__pyx_args, 50);
3960  values[51] = PyTuple_GET_ITEM(__pyx_args, 51);
3961  values[52] = PyTuple_GET_ITEM(__pyx_args, 52);
3962  values[53] = PyTuple_GET_ITEM(__pyx_args, 53);
3963  }
3964  __pyx_v_mesh_trial_ref = ((PyArrayObject *)values[0]);
3965  __pyx_v_mesh_grad_trial_ref = ((PyArrayObject *)values[1]);
3966  __pyx_v_mesh_dof = ((PyArrayObject *)values[2]);
3967  __pyx_v_mesh_l2g = ((PyArrayObject *)values[3]);
3968  __pyx_v_dV_ref = ((PyArrayObject *)values[4]);
3969  __pyx_v_u_trial_ref = ((PyArrayObject *)values[5]);
3970  __pyx_v_u_grad_trial_ref = ((PyArrayObject *)values[6]);
3971  __pyx_v_u_test_ref = ((PyArrayObject *)values[7]);
3972  __pyx_v_u_grad_test_ref = ((PyArrayObject *)values[8]);
3973  __pyx_v_elementDiameter = ((PyArrayObject *)values[9]);
3974  __pyx_v_cfl = ((PyArrayObject *)values[10]);
3975  __pyx_v_CT_sge = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_CT_sge == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 282, __pyx_L3_error)
3976  __pyx_v_sc_uref = __pyx_PyFloat_AsDouble(values[12]); if (unlikely((__pyx_v_sc_uref == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L3_error)
3977  __pyx_v_sc_alpha = __pyx_PyFloat_AsDouble(values[13]); if (unlikely((__pyx_v_sc_alpha == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 284, __pyx_L3_error)
3978  __pyx_v_useMetrics = __pyx_PyFloat_AsDouble(values[14]); if (unlikely((__pyx_v_useMetrics == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 285, __pyx_L3_error)
3979  __pyx_v_mesh_trial_trace_ref = ((PyArrayObject *)values[15]);
3980  __pyx_v_mesh_grad_trial_trace_ref = ((PyArrayObject *)values[16]);
3981  __pyx_v_dS_ref = ((PyArrayObject *)values[17]);
3982  __pyx_v_u_trial_trace_ref = ((PyArrayObject *)values[18]);
3983  __pyx_v_u_grad_trial_trace_ref = ((PyArrayObject *)values[19]);
3984  __pyx_v_u_test_trace_ref = ((PyArrayObject *)values[20]);
3985  __pyx_v_u_grad_test_trace_ref = ((PyArrayObject *)values[21]);
3986  __pyx_v_normal_ref = ((PyArrayObject *)values[22]);
3987  __pyx_v_boundaryJac_ref = ((PyArrayObject *)values[23]);
3988  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[24]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 295, __pyx_L3_error)
3989  __pyx_v_u_l2g = ((PyArrayObject *)values[25]);
3990  __pyx_v_u_dof = ((PyArrayObject *)values[26]);
3991  __pyx_v_sdInfo_u_u_rowptr = ((PyArrayObject *)values[27]);
3992  __pyx_v_sdInfo_u_u_colind = ((PyArrayObject *)values[28]);
3993  __pyx_v_q_a = ((PyArrayObject *)values[29]);
3994  __pyx_v_q_v = ((PyArrayObject *)values[30]);
3995  __pyx_v_q_r = ((PyArrayObject *)values[31]);
3996  __pyx_v_lag_shockCapturing = __Pyx_PyInt_As_int(values[32]); if (unlikely((__pyx_v_lag_shockCapturing == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L3_error)
3997  __pyx_v_shockCapturingDiffusion = __pyx_PyFloat_AsDouble(values[33]); if (unlikely((__pyx_v_shockCapturingDiffusion == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L3_error)
3998  __pyx_v_q_numDiff_u = ((PyArrayObject *)values[34]);
3999  __pyx_v_q_numDiff_u_last = ((PyArrayObject *)values[35]);
4000  __pyx_v_csrRowIndeces_u_u = ((PyArrayObject *)values[36]);
4001  __pyx_v_csrColumnOffsets_u_u = ((PyArrayObject *)values[37]);
4002  __pyx_v_globalJacobian = values[38];
4003  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[39]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L3_error)
4004  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[40]);
4005  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[41]);
4006  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[42]);
4007  __pyx_v_ebqe_a = ((PyArrayObject *)values[43]);
4008  __pyx_v_ebqe_v = ((PyArrayObject *)values[44]);
4009  __pyx_v_isDOFBoundary_u = ((PyArrayObject *)values[45]);
4010  __pyx_v_ebqe_bc_u_ext = ((PyArrayObject *)values[46]);
4011  __pyx_v_isFluxBoundary_u = ((PyArrayObject *)values[47]);
4012  __pyx_v_isAdvectiveFluxBoundary_u = ((PyArrayObject *)values[48]);
4013  __pyx_v_ebqe_bc_flux_u_ext = ((PyArrayObject *)values[49]);
4014  __pyx_v_ebqe_bc_advectiveFlux_u_ext = ((PyArrayObject *)values[50]);
4015  __pyx_v_csrColumnOffsets_eb_u_u = ((PyArrayObject *)values[51]);
4016  __pyx_v_ebqe_penalty = ((PyArrayObject *)values[52]);
4017  __pyx_v_adjoint_sigma = __pyx_PyFloat_AsDouble(values[53]); if (unlikely((__pyx_v_adjoint_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 324, __pyx_L3_error)
4018  }
4019  goto __pyx_L4_argument_unpacking_done;
4020  __pyx_L5_argtuple_error:;
4021  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 270, __pyx_L3_error)
4022  __pyx_L3_error:;
4023  __Pyx_AddTraceback("ADR.ADR.calculateJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
4024  __Pyx_RefNannyFinishContext();
4025  return NULL;
4026  __pyx_L4_argument_unpacking_done:;
4027  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_trial_ref", 0))) __PYX_ERR(0, 271, __pyx_L1_error)
4028  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_grad_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_grad_trial_ref", 0))) __PYX_ERR(0, 272, __pyx_L1_error)
4029  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_dof), __pyx_ptype_5numpy_ndarray, 1, "mesh_dof", 0))) __PYX_ERR(0, 273, __pyx_L1_error)
4030  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_l2g), __pyx_ptype_5numpy_ndarray, 1, "mesh_l2g", 0))) __PYX_ERR(0, 274, __pyx_L1_error)
4031  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dV_ref), __pyx_ptype_5numpy_ndarray, 1, "dV_ref", 0))) __PYX_ERR(0, 275, __pyx_L1_error)
4032  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "u_trial_ref", 0))) __PYX_ERR(0, 276, __pyx_L1_error)
4033  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_trial_ref", 0))) __PYX_ERR(0, 277, __pyx_L1_error)
4034  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_test_ref), __pyx_ptype_5numpy_ndarray, 1, "u_test_ref", 0))) __PYX_ERR(0, 278, __pyx_L1_error)
4035  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_test_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_test_ref", 0))) __PYX_ERR(0, 279, __pyx_L1_error)
4036  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1, "elementDiameter", 0))) __PYX_ERR(0, 280, __pyx_L1_error)
4037  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1, "cfl", 0))) __PYX_ERR(0, 281, __pyx_L1_error)
4038  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_trial_trace_ref", 0))) __PYX_ERR(0, 286, __pyx_L1_error)
4039  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_grad_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_grad_trial_trace_ref", 0))) __PYX_ERR(0, 287, __pyx_L1_error)
4040  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS_ref), __pyx_ptype_5numpy_ndarray, 1, "dS_ref", 0))) __PYX_ERR(0, 288, __pyx_L1_error)
4041  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_trial_trace_ref", 0))) __PYX_ERR(0, 289, __pyx_L1_error)
4042  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_trial_trace_ref", 0))) __PYX_ERR(0, 290, __pyx_L1_error)
4043  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_test_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_test_trace_ref", 0))) __PYX_ERR(0, 291, __pyx_L1_error)
4044  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_test_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_test_trace_ref", 0))) __PYX_ERR(0, 292, __pyx_L1_error)
4045  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normal_ref), __pyx_ptype_5numpy_ndarray, 1, "normal_ref", 0))) __PYX_ERR(0, 293, __pyx_L1_error)
4046  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_boundaryJac_ref), __pyx_ptype_5numpy_ndarray, 1, "boundaryJac_ref", 0))) __PYX_ERR(0, 294, __pyx_L1_error)
4047  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_l2g), __pyx_ptype_5numpy_ndarray, 1, "u_l2g", 0))) __PYX_ERR(0, 296, __pyx_L1_error)
4048  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_dof), __pyx_ptype_5numpy_ndarray, 1, "u_dof", 0))) __PYX_ERR(0, 297, __pyx_L1_error)
4049  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sdInfo_u_u_rowptr), __pyx_ptype_5numpy_ndarray, 1, "sdInfo_u_u_rowptr", 0))) __PYX_ERR(0, 298, __pyx_L1_error)
4050  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sdInfo_u_u_colind), __pyx_ptype_5numpy_ndarray, 1, "sdInfo_u_u_colind", 0))) __PYX_ERR(0, 299, __pyx_L1_error)
4051  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_a), __pyx_ptype_5numpy_ndarray, 1, "q_a", 0))) __PYX_ERR(0, 300, __pyx_L1_error)
4052  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_v), __pyx_ptype_5numpy_ndarray, 1, "q_v", 0))) __PYX_ERR(0, 301, __pyx_L1_error)
4053  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_r), __pyx_ptype_5numpy_ndarray, 1, "q_r", 0))) __PYX_ERR(0, 302, __pyx_L1_error)
4054  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_numDiff_u), __pyx_ptype_5numpy_ndarray, 1, "q_numDiff_u", 0))) __PYX_ERR(0, 305, __pyx_L1_error)
4055  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_numDiff_u_last), __pyx_ptype_5numpy_ndarray, 1, "q_numDiff_u_last", 0))) __PYX_ERR(0, 306, __pyx_L1_error)
4056  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces_u_u), __pyx_ptype_5numpy_ndarray, 1, "csrRowIndeces_u_u", 0))) __PYX_ERR(0, 307, __pyx_L1_error)
4057  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_u_u), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_u_u", 0))) __PYX_ERR(0, 308, __pyx_L1_error)
4058  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 311, __pyx_L1_error)
4059  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 312, __pyx_L1_error)
4060  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 313, __pyx_L1_error)
4061  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_a), __pyx_ptype_5numpy_ndarray, 1, "ebqe_a", 0))) __PYX_ERR(0, 314, __pyx_L1_error)
4062  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_v), __pyx_ptype_5numpy_ndarray, 1, "ebqe_v", 0))) __PYX_ERR(0, 315, __pyx_L1_error)
4063  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isDOFBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isDOFBoundary_u", 0))) __PYX_ERR(0, 316, __pyx_L1_error)
4064  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_u_ext", 0))) __PYX_ERR(0, 317, __pyx_L1_error)
4065  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isFluxBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isFluxBoundary_u", 0))) __PYX_ERR(0, 318, __pyx_L1_error)
4066  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isAdvectiveFluxBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isAdvectiveFluxBoundary_u", 0))) __PYX_ERR(0, 319, __pyx_L1_error)
4067  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_flux_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_flux_u_ext", 0))) __PYX_ERR(0, 320, __pyx_L1_error)
4068  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_advectiveFlux_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_advectiveFlux_u_ext", 0))) __PYX_ERR(0, 321, __pyx_L1_error)
4069  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb_u_u), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_eb_u_u", 0))) __PYX_ERR(0, 322, __pyx_L1_error)
4070  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_penalty), __pyx_ptype_5numpy_ndarray, 1, "ebqe_penalty", 0))) __PYX_ERR(0, 323, __pyx_L1_error)
4071  __pyx_r = __pyx_pf_3ADR_3ADR_6calculateJacobian(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self), __pyx_v_mesh_trial_ref, __pyx_v_mesh_grad_trial_ref, __pyx_v_mesh_dof, __pyx_v_mesh_l2g, __pyx_v_dV_ref, __pyx_v_u_trial_ref, __pyx_v_u_grad_trial_ref, __pyx_v_u_test_ref, __pyx_v_u_grad_test_ref, __pyx_v_elementDiameter, __pyx_v_cfl, __pyx_v_CT_sge, __pyx_v_sc_uref, __pyx_v_sc_alpha, __pyx_v_useMetrics, __pyx_v_mesh_trial_trace_ref, __pyx_v_mesh_grad_trial_trace_ref, __pyx_v_dS_ref, __pyx_v_u_trial_trace_ref, __pyx_v_u_grad_trial_trace_ref, __pyx_v_u_test_trace_ref, __pyx_v_u_grad_test_trace_ref, __pyx_v_normal_ref, __pyx_v_boundaryJac_ref, __pyx_v_nElements_global, __pyx_v_u_l2g, __pyx_v_u_dof, __pyx_v_sdInfo_u_u_rowptr, __pyx_v_sdInfo_u_u_colind, __pyx_v_q_a, __pyx_v_q_v, __pyx_v_q_r, __pyx_v_lag_shockCapturing, __pyx_v_shockCapturingDiffusion, __pyx_v_q_numDiff_u, __pyx_v_q_numDiff_u_last, __pyx_v_csrRowIndeces_u_u, __pyx_v_csrColumnOffsets_u_u, __pyx_v_globalJacobian, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_ebqe_a, __pyx_v_ebqe_v, __pyx_v_isDOFBoundary_u, __pyx_v_ebqe_bc_u_ext, __pyx_v_isFluxBoundary_u, __pyx_v_isAdvectiveFluxBoundary_u, __pyx_v_ebqe_bc_flux_u_ext, __pyx_v_ebqe_bc_advectiveFlux_u_ext, __pyx_v_csrColumnOffsets_eb_u_u, __pyx_v_ebqe_penalty, __pyx_v_adjoint_sigma);
4072 
4073  /* function exit code */
4074  goto __pyx_L0;
4075  __pyx_L1_error:;
4076  __pyx_r = NULL;
4077  __pyx_L0:;
4078  __Pyx_RefNannyFinishContext();
4079  return __pyx_r;
4080 }
4081 
4082 static PyObject *__pyx_pf_3ADR_3ADR_6calculateJacobian(struct __pyx_obj_3ADR_ADR *__pyx_v_self, PyArrayObject *__pyx_v_mesh_trial_ref, PyArrayObject *__pyx_v_mesh_grad_trial_ref, PyArrayObject *__pyx_v_mesh_dof, PyArrayObject *__pyx_v_mesh_l2g, PyArrayObject *__pyx_v_dV_ref, PyArrayObject *__pyx_v_u_trial_ref, PyArrayObject *__pyx_v_u_grad_trial_ref, PyArrayObject *__pyx_v_u_test_ref, PyArrayObject *__pyx_v_u_grad_test_ref, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_cfl, double __pyx_v_CT_sge, double __pyx_v_sc_uref, double __pyx_v_sc_alpha, double __pyx_v_useMetrics, PyArrayObject *__pyx_v_mesh_trial_trace_ref, PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref, PyArrayObject *__pyx_v_dS_ref, PyArrayObject *__pyx_v_u_trial_trace_ref, PyArrayObject *__pyx_v_u_grad_trial_trace_ref, PyArrayObject *__pyx_v_u_test_trace_ref, PyArrayObject *__pyx_v_u_grad_test_trace_ref, PyArrayObject *__pyx_v_normal_ref, PyArrayObject *__pyx_v_boundaryJac_ref, int __pyx_v_nElements_global, PyArrayObject *__pyx_v_u_l2g, PyArrayObject *__pyx_v_u_dof, PyArrayObject *__pyx_v_sdInfo_u_u_rowptr, PyArrayObject *__pyx_v_sdInfo_u_u_colind, PyArrayObject *__pyx_v_q_a, PyArrayObject *__pyx_v_q_v, PyArrayObject *__pyx_v_q_r, int __pyx_v_lag_shockCapturing, double __pyx_v_shockCapturingDiffusion, PyArrayObject *__pyx_v_q_numDiff_u, PyArrayObject *__pyx_v_q_numDiff_u_last, PyArrayObject *__pyx_v_csrRowIndeces_u_u, PyArrayObject *__pyx_v_csrColumnOffsets_u_u, PyObject *__pyx_v_globalJacobian, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebqe_a, PyArrayObject *__pyx_v_ebqe_v, PyArrayObject *__pyx_v_isDOFBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_u_ext, PyArrayObject *__pyx_v_isFluxBoundary_u, PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext, PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext, PyArrayObject *__pyx_v_csrColumnOffsets_eb_u_u, PyArrayObject *__pyx_v_ebqe_penalty, double __pyx_v_adjoint_sigma) {
4083  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr = 0;
4084  CYTHON_UNUSED PyArrayObject *__pyx_v_colind = 0;
4085  PyArrayObject *__pyx_v_globalJacobian_a = 0;
4086  PyObject *__pyx_r = NULL;
4087  __Pyx_RefNannyDeclarations
4088  PyObject *__pyx_t_1 = NULL;
4089  PyObject *__pyx_t_2 = NULL;
4090  PyObject *__pyx_t_3 = NULL;
4091  PyObject *__pyx_t_4 = NULL;
4092  PyObject *__pyx_t_5 = NULL;
4093  PyObject *(*__pyx_t_6)(PyObject *);
4094  __Pyx_RefNannySetupContext("calculateJacobian", 0);
4095 
4096  /* "ADR.pyx":329
4097  * """
4098  * cdef numpy.ndarray rowptr,colind,globalJacobian_a
4099  * (rowptr,colind,globalJacobian_a) = globalJacobian.getCSRrepresentation() # <<<<<<<<<<<<<<
4100  * self.thisptr.calculateJacobian(<double*> mesh_trial_ref.data,
4101  * <double*> mesh_grad_trial_ref.data,
4102  */
4103  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_globalJacobian, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error)
4104  __Pyx_GOTREF(__pyx_t_2);
4105  __pyx_t_3 = NULL;
4106  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4107  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4108  if (likely(__pyx_t_3)) {
4109  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4110  __Pyx_INCREF(__pyx_t_3);
4111  __Pyx_INCREF(function);
4112  __Pyx_DECREF_SET(__pyx_t_2, function);
4113  }
4114  }
4115  if (__pyx_t_3) {
4116  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
4117  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4118  } else {
4119  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
4120  }
4121  __Pyx_GOTREF(__pyx_t_1);
4122  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4123  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
4124  PyObject* sequence = __pyx_t_1;
4125  #if !CYTHON_COMPILING_IN_PYPY
4126  Py_ssize_t size = Py_SIZE(sequence);
4127  #else
4128  Py_ssize_t size = PySequence_Size(sequence);
4129  #endif
4130  if (unlikely(size != 3)) {
4131  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
4132  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
4133  __PYX_ERR(0, 329, __pyx_L1_error)
4134  }
4135  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4136  if (likely(PyTuple_CheckExact(sequence))) {
4137  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
4138  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
4139  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
4140  } else {
4141  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
4142  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
4143  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
4144  }
4145  __Pyx_INCREF(__pyx_t_2);
4146  __Pyx_INCREF(__pyx_t_3);
4147  __Pyx_INCREF(__pyx_t_4);
4148  #else
4149  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error)
4150  __Pyx_GOTREF(__pyx_t_2);
4151  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error)
4152  __Pyx_GOTREF(__pyx_t_3);
4153  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error)
4154  __Pyx_GOTREF(__pyx_t_4);
4155  #endif
4156  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4157  } else {
4158  Py_ssize_t index = -1;
4159  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 329, __pyx_L1_error)
4160  __Pyx_GOTREF(__pyx_t_5);
4161  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4162  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
4163  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
4164  __Pyx_GOTREF(__pyx_t_2);
4165  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
4166  __Pyx_GOTREF(__pyx_t_3);
4167  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
4168  __Pyx_GOTREF(__pyx_t_4);
4169  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
4170  __pyx_t_6 = NULL;
4171  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4172  goto __pyx_L4_unpacking_done;
4173  __pyx_L3_unpacking_failed:;
4174  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4175  __pyx_t_6 = NULL;
4176  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
4177  __PYX_ERR(0, 329, __pyx_L1_error)
4178  __pyx_L4_unpacking_done:;
4179  }
4180  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 329, __pyx_L1_error)
4181  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 329, __pyx_L1_error)
4182  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 329, __pyx_L1_error)
4183  __pyx_v_rowptr = ((PyArrayObject *)__pyx_t_2);
4184  __pyx_t_2 = 0;
4185  __pyx_v_colind = ((PyArrayObject *)__pyx_t_3);
4186  __pyx_t_3 = 0;
4187  __pyx_v_globalJacobian_a = ((PyArrayObject *)__pyx_t_4);
4188  __pyx_t_4 = 0;
4189 
4190  /* "ADR.pyx":330
4191  * cdef numpy.ndarray rowptr,colind,globalJacobian_a
4192  * (rowptr,colind,globalJacobian_a) = globalJacobian.getCSRrepresentation()
4193  * self.thisptr.calculateJacobian(<double*> mesh_trial_ref.data, # <<<<<<<<<<<<<<
4194  * <double*> mesh_grad_trial_ref.data,
4195  * <double*> mesh_dof.data,
4196  */
4197  __pyx_v_self->thisptr->calculateJacobian(((double *)__pyx_v_mesh_trial_ref->data), ((double *)__pyx_v_mesh_grad_trial_ref->data), ((double *)__pyx_v_mesh_dof->data), ((int *)__pyx_v_mesh_l2g->data), ((double *)__pyx_v_dV_ref->data), ((double *)__pyx_v_u_trial_ref->data), ((double *)__pyx_v_u_grad_trial_ref->data), ((double *)__pyx_v_u_test_ref->data), ((double *)__pyx_v_u_grad_test_ref->data), ((double *)__pyx_v_elementDiameter->data), ((double *)__pyx_v_cfl->data), __pyx_v_CT_sge, __pyx_v_sc_uref, __pyx_v_sc_alpha, __pyx_v_useMetrics, ((double *)__pyx_v_mesh_trial_trace_ref->data), ((double *)__pyx_v_mesh_grad_trial_trace_ref->data), ((double *)__pyx_v_dS_ref->data), ((double *)__pyx_v_u_trial_trace_ref->data), ((double *)__pyx_v_u_grad_trial_trace_ref->data), ((double *)__pyx_v_u_test_trace_ref->data), ((double *)__pyx_v_u_grad_test_trace_ref->data), ((double *)__pyx_v_normal_ref->data), ((double *)__pyx_v_boundaryJac_ref->data), __pyx_v_nElements_global, ((int *)__pyx_v_u_l2g->data), ((double *)__pyx_v_u_dof->data), ((int *)__pyx_v_sdInfo_u_u_rowptr->data), ((int *)__pyx_v_sdInfo_u_u_colind->data), ((double *)__pyx_v_q_a->data), ((double *)__pyx_v_q_v->data), ((double *)__pyx_v_q_r->data), __pyx_v_lag_shockCapturing, __pyx_v_shockCapturingDiffusion, ((double *)__pyx_v_q_numDiff_u->data), ((double *)__pyx_v_q_numDiff_u_last->data), ((int *)__pyx_v_csrRowIndeces_u_u->data), ((int *)__pyx_v_csrColumnOffsets_u_u->data), ((double *)__pyx_v_globalJacobian_a->data), __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_ebqe_a->data), ((double *)__pyx_v_ebqe_v->data), ((int *)__pyx_v_isDOFBoundary_u->data), ((double *)__pyx_v_ebqe_bc_u_ext->data), ((int *)__pyx_v_isFluxBoundary_u->data), ((int *)__pyx_v_isAdvectiveFluxBoundary_u->data), ((double *)__pyx_v_ebqe_bc_flux_u_ext->data), ((double *)__pyx_v_ebqe_bc_advectiveFlux_u_ext->data), ((int *)__pyx_v_csrColumnOffsets_eb_u_u->data), ((double *)__pyx_v_ebqe_penalty->data), __pyx_v_adjoint_sigma);
4198 
4199  /* "ADR.pyx":270
4200  * <double*> ebqe_penalty.data,
4201  * adjoint_sigma)
4202  * def calculateJacobian(self, # <<<<<<<<<<<<<<
4203  * numpy.ndarray mesh_trial_ref,
4204  * numpy.ndarray mesh_grad_trial_ref,
4205  */
4206 
4207  /* function exit code */
4208  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4209  goto __pyx_L0;
4210  __pyx_L1_error:;
4211  __Pyx_XDECREF(__pyx_t_1);
4212  __Pyx_XDECREF(__pyx_t_2);
4213  __Pyx_XDECREF(__pyx_t_3);
4214  __Pyx_XDECREF(__pyx_t_4);
4215  __Pyx_XDECREF(__pyx_t_5);
4216  __Pyx_AddTraceback("ADR.ADR.calculateJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
4217  __pyx_r = NULL;
4218  __pyx_L0:;
4219  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr);
4220  __Pyx_XDECREF((PyObject *)__pyx_v_colind);
4221  __Pyx_XDECREF((PyObject *)__pyx_v_globalJacobian_a);
4222  __Pyx_XGIVEREF(__pyx_r);
4223  __Pyx_RefNannyFinishContext();
4224  return __pyx_r;
4225 }
4226 
4227 /* "ADR.pyx":394
4228  * """
4229  *
4230  * def __init__(self,coefficients,nd): # <<<<<<<<<<<<<<
4231  * SGE_base.__init__(self,coefficients,nd,lag=False)
4232  * def initializeElementQuadrature(self,mesh,t,cq):
4233  */
4234 
4235 /* Python wrapper */
4236 static PyObject *__pyx_pw_3ADR_12SubgridError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4237 static PyMethodDef __pyx_mdef_3ADR_12SubgridError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_12SubgridError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
4238 static PyObject *__pyx_pw_3ADR_12SubgridError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4239  PyObject *__pyx_v_self = 0;
4240  PyObject *__pyx_v_coefficients = 0;
4241  PyObject *__pyx_v_nd = 0;
4242  PyObject *__pyx_r = 0;
4243  __Pyx_RefNannyDeclarations
4244  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
4245  {
4246  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_coefficients,&__pyx_n_s_nd,0};
4247  PyObject* values[3] = {0,0,0};
4248  if (unlikely(__pyx_kwds)) {
4249  Py_ssize_t kw_args;
4250  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4251  switch (pos_args) {
4252  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4253  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4254  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4255  case 0: break;
4256  default: goto __pyx_L5_argtuple_error;
4257  }
4258  kw_args = PyDict_Size(__pyx_kwds);
4259  switch (pos_args) {
4260  case 0:
4261  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4262  else goto __pyx_L5_argtuple_error;
4263  case 1:
4264  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
4265  else {
4266  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 394, __pyx_L3_error)
4267  }
4268  case 2:
4269  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nd)) != 0)) kw_args--;
4270  else {
4271  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 394, __pyx_L3_error)
4272  }
4273  }
4274  if (unlikely(kw_args > 0)) {
4275  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 394, __pyx_L3_error)
4276  }
4277  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
4278  goto __pyx_L5_argtuple_error;
4279  } else {
4280  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4281  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4282  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4283  }
4284  __pyx_v_self = values[0];
4285  __pyx_v_coefficients = values[1];
4286  __pyx_v_nd = values[2];
4287  }
4288  goto __pyx_L4_argument_unpacking_done;
4289  __pyx_L5_argtuple_error:;
4290  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 394, __pyx_L3_error)
4291  __pyx_L3_error:;
4292  __Pyx_AddTraceback("ADR.SubgridError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4293  __Pyx_RefNannyFinishContext();
4294  return NULL;
4295  __pyx_L4_argument_unpacking_done:;
4296  __pyx_r = __pyx_pf_3ADR_12SubgridError___init__(__pyx_self, __pyx_v_self, __pyx_v_coefficients, __pyx_v_nd);
4297 
4298  /* function exit code */
4299  __Pyx_RefNannyFinishContext();
4300  return __pyx_r;
4301 }
4302 
4303 static PyObject *__pyx_pf_3ADR_12SubgridError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_nd) {
4304  PyObject *__pyx_r = NULL;
4305  __Pyx_RefNannyDeclarations
4306  PyObject *__pyx_t_1 = NULL;
4307  PyObject *__pyx_t_2 = NULL;
4308  PyObject *__pyx_t_3 = NULL;
4309  PyObject *__pyx_t_4 = NULL;
4310  __Pyx_RefNannySetupContext("__init__", 0);
4311 
4312  /* "ADR.pyx":395
4313  *
4314  * def __init__(self,coefficients,nd):
4315  * SGE_base.__init__(self,coefficients,nd,lag=False) # <<<<<<<<<<<<<<
4316  * def initializeElementQuadrature(self,mesh,t,cq):
4317  * pass
4318  */
4319  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_SGE_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
4320  __Pyx_GOTREF(__pyx_t_1);
4321  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
4322  __Pyx_GOTREF(__pyx_t_2);
4323  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4324  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
4325  __Pyx_GOTREF(__pyx_t_1);
4326  __Pyx_INCREF(__pyx_v_self);
4327  __Pyx_GIVEREF(__pyx_v_self);
4328  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
4329  __Pyx_INCREF(__pyx_v_coefficients);
4330  __Pyx_GIVEREF(__pyx_v_coefficients);
4331  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_coefficients);
4332  __Pyx_INCREF(__pyx_v_nd);
4333  __Pyx_GIVEREF(__pyx_v_nd);
4334  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_nd);
4335  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error)
4336  __Pyx_GOTREF(__pyx_t_3);
4337  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_lag, Py_False) < 0) __PYX_ERR(0, 395, __pyx_L1_error)
4338  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __pyx_L1_error)
4339  __Pyx_GOTREF(__pyx_t_4);
4340  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4341  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4342  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4343  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4344 
4345  /* "ADR.pyx":394
4346  * """
4347  *
4348  * def __init__(self,coefficients,nd): # <<<<<<<<<<<<<<
4349  * SGE_base.__init__(self,coefficients,nd,lag=False)
4350  * def initializeElementQuadrature(self,mesh,t,cq):
4351  */
4352 
4353  /* function exit code */
4354  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4355  goto __pyx_L0;
4356  __pyx_L1_error:;
4357  __Pyx_XDECREF(__pyx_t_1);
4358  __Pyx_XDECREF(__pyx_t_2);
4359  __Pyx_XDECREF(__pyx_t_3);
4360  __Pyx_XDECREF(__pyx_t_4);
4361  __Pyx_AddTraceback("ADR.SubgridError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4362  __pyx_r = NULL;
4363  __pyx_L0:;
4364  __Pyx_XGIVEREF(__pyx_r);
4365  __Pyx_RefNannyFinishContext();
4366  return __pyx_r;
4367 }
4368 
4369 /* "ADR.pyx":396
4370  * def __init__(self,coefficients,nd):
4371  * SGE_base.__init__(self,coefficients,nd,lag=False)
4372  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
4373  * pass
4374  * def updateSubgridErrorHistory(self,initializationPhase=False):
4375  */
4376 
4377 /* Python wrapper */
4378 static PyObject *__pyx_pw_3ADR_12SubgridError_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4379 static PyMethodDef __pyx_mdef_3ADR_12SubgridError_3initializeElementQuadrature = {"initializeElementQuadrature", (PyCFunction)__pyx_pw_3ADR_12SubgridError_3initializeElementQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
4380 static PyObject *__pyx_pw_3ADR_12SubgridError_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4381  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
4382  CYTHON_UNUSED PyObject *__pyx_v_mesh = 0;
4383  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
4384  CYTHON_UNUSED PyObject *__pyx_v_cq = 0;
4385  PyObject *__pyx_r = 0;
4386  __Pyx_RefNannyDeclarations
4387  __Pyx_RefNannySetupContext("initializeElementQuadrature (wrapper)", 0);
4388  {
4389  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mesh,&__pyx_n_s_t,&__pyx_n_s_cq,0};
4390  PyObject* values[4] = {0,0,0,0};
4391  if (unlikely(__pyx_kwds)) {
4392  Py_ssize_t kw_args;
4393  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4394  switch (pos_args) {
4395  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4396  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4397  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4398  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4399  case 0: break;
4400  default: goto __pyx_L5_argtuple_error;
4401  }
4402  kw_args = PyDict_Size(__pyx_kwds);
4403  switch (pos_args) {
4404  case 0:
4405  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4406  else goto __pyx_L5_argtuple_error;
4407  case 1:
4408  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh)) != 0)) kw_args--;
4409  else {
4410  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 1); __PYX_ERR(0, 396, __pyx_L3_error)
4411  }
4412  case 2:
4413  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
4414  else {
4415  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 2); __PYX_ERR(0, 396, __pyx_L3_error)
4416  }
4417  case 3:
4418  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cq)) != 0)) kw_args--;
4419  else {
4420  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 3); __PYX_ERR(0, 396, __pyx_L3_error)
4421  }
4422  }
4423  if (unlikely(kw_args > 0)) {
4424  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeElementQuadrature") < 0)) __PYX_ERR(0, 396, __pyx_L3_error)
4425  }
4426  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
4427  goto __pyx_L5_argtuple_error;
4428  } else {
4429  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4430  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4431  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4432  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4433  }
4434  __pyx_v_self = values[0];
4435  __pyx_v_mesh = values[1];
4436  __pyx_v_t = values[2];
4437  __pyx_v_cq = values[3];
4438  }
4439  goto __pyx_L4_argument_unpacking_done;
4440  __pyx_L5_argtuple_error:;
4441  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 396, __pyx_L3_error)
4442  __pyx_L3_error:;
4443  __Pyx_AddTraceback("ADR.SubgridError.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
4444  __Pyx_RefNannyFinishContext();
4445  return NULL;
4446  __pyx_L4_argument_unpacking_done:;
4447  __pyx_r = __pyx_pf_3ADR_12SubgridError_2initializeElementQuadrature(__pyx_self, __pyx_v_self, __pyx_v_mesh, __pyx_v_t, __pyx_v_cq);
4448 
4449  /* function exit code */
4450  __Pyx_RefNannyFinishContext();
4451  return __pyx_r;
4452 }
4453 
4454 static PyObject *__pyx_pf_3ADR_12SubgridError_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_mesh, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_cq) {
4455  PyObject *__pyx_r = NULL;
4456  __Pyx_RefNannyDeclarations
4457  __Pyx_RefNannySetupContext("initializeElementQuadrature", 0);
4458 
4459  /* function exit code */
4460  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4461  __Pyx_XGIVEREF(__pyx_r);
4462  __Pyx_RefNannyFinishContext();
4463  return __pyx_r;
4464 }
4465 
4466 /* "ADR.pyx":398
4467  * def initializeElementQuadrature(self,mesh,t,cq):
4468  * pass
4469  * def updateSubgridErrorHistory(self,initializationPhase=False): # <<<<<<<<<<<<<<
4470  * pass
4471  * def calculateSubgridError(self,q):
4472  */
4473 
4474 /* Python wrapper */
4475 static PyObject *__pyx_pw_3ADR_12SubgridError_5updateSubgridErrorHistory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4476 static PyMethodDef __pyx_mdef_3ADR_12SubgridError_5updateSubgridErrorHistory = {"updateSubgridErrorHistory", (PyCFunction)__pyx_pw_3ADR_12SubgridError_5updateSubgridErrorHistory, METH_VARARGS|METH_KEYWORDS, 0};
4477 static PyObject *__pyx_pw_3ADR_12SubgridError_5updateSubgridErrorHistory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4478  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
4479  CYTHON_UNUSED PyObject *__pyx_v_initializationPhase = 0;
4480  PyObject *__pyx_r = 0;
4481  __Pyx_RefNannyDeclarations
4482  __Pyx_RefNannySetupContext("updateSubgridErrorHistory (wrapper)", 0);
4483  {
4484  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_initializationPhase,0};
4485  PyObject* values[2] = {0,0};
4486  values[1] = ((PyObject *)((PyObject *)Py_False));
4487  if (unlikely(__pyx_kwds)) {
4488  Py_ssize_t kw_args;
4489  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4490  switch (pos_args) {
4491  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4492  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4493  case 0: break;
4494  default: goto __pyx_L5_argtuple_error;
4495  }
4496  kw_args = PyDict_Size(__pyx_kwds);
4497  switch (pos_args) {
4498  case 0:
4499  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4500  else goto __pyx_L5_argtuple_error;
4501  case 1:
4502  if (kw_args > 0) {
4503  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_initializationPhase);
4504  if (value) { values[1] = value; kw_args--; }
4505  }
4506  }
4507  if (unlikely(kw_args > 0)) {
4508  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateSubgridErrorHistory") < 0)) __PYX_ERR(0, 398, __pyx_L3_error)
4509  }
4510  } else {
4511  switch (PyTuple_GET_SIZE(__pyx_args)) {
4512  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4513  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4514  break;
4515  default: goto __pyx_L5_argtuple_error;
4516  }
4517  }
4518  __pyx_v_self = values[0];
4519  __pyx_v_initializationPhase = values[1];
4520  }
4521  goto __pyx_L4_argument_unpacking_done;
4522  __pyx_L5_argtuple_error:;
4523  __Pyx_RaiseArgtupleInvalid("updateSubgridErrorHistory", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 398, __pyx_L3_error)
4524  __pyx_L3_error:;
4525  __Pyx_AddTraceback("ADR.SubgridError.updateSubgridErrorHistory", __pyx_clineno, __pyx_lineno, __pyx_filename);
4526  __Pyx_RefNannyFinishContext();
4527  return NULL;
4528  __pyx_L4_argument_unpacking_done:;
4529  __pyx_r = __pyx_pf_3ADR_12SubgridError_4updateSubgridErrorHistory(__pyx_self, __pyx_v_self, __pyx_v_initializationPhase);
4530 
4531  /* function exit code */
4532  __Pyx_RefNannyFinishContext();
4533  return __pyx_r;
4534 }
4535 
4536 static PyObject *__pyx_pf_3ADR_12SubgridError_4updateSubgridErrorHistory(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_initializationPhase) {
4537  PyObject *__pyx_r = NULL;
4538  __Pyx_RefNannyDeclarations
4539  __Pyx_RefNannySetupContext("updateSubgridErrorHistory", 0);
4540 
4541  /* function exit code */
4542  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4543  __Pyx_XGIVEREF(__pyx_r);
4544  __Pyx_RefNannyFinishContext();
4545  return __pyx_r;
4546 }
4547 
4548 /* "ADR.pyx":400
4549  * def updateSubgridErrorHistory(self,initializationPhase=False):
4550  * pass
4551  * def calculateSubgridError(self,q): # <<<<<<<<<<<<<<
4552  * pass
4553  *
4554  */
4555 
4556 /* Python wrapper */
4557 static PyObject *__pyx_pw_3ADR_12SubgridError_7calculateSubgridError(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4558 static PyMethodDef __pyx_mdef_3ADR_12SubgridError_7calculateSubgridError = {"calculateSubgridError", (PyCFunction)__pyx_pw_3ADR_12SubgridError_7calculateSubgridError, METH_VARARGS|METH_KEYWORDS, 0};
4559 static PyObject *__pyx_pw_3ADR_12SubgridError_7calculateSubgridError(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4560  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
4561  CYTHON_UNUSED PyObject *__pyx_v_q = 0;
4562  PyObject *__pyx_r = 0;
4563  __Pyx_RefNannyDeclarations
4564  __Pyx_RefNannySetupContext("calculateSubgridError (wrapper)", 0);
4565  {
4566  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_q,0};
4567  PyObject* values[2] = {0,0};
4568  if (unlikely(__pyx_kwds)) {
4569  Py_ssize_t kw_args;
4570  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4571  switch (pos_args) {
4572  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4573  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4574  case 0: break;
4575  default: goto __pyx_L5_argtuple_error;
4576  }
4577  kw_args = PyDict_Size(__pyx_kwds);
4578  switch (pos_args) {
4579  case 0:
4580  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4581  else goto __pyx_L5_argtuple_error;
4582  case 1:
4583  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
4584  else {
4585  __Pyx_RaiseArgtupleInvalid("calculateSubgridError", 1, 2, 2, 1); __PYX_ERR(0, 400, __pyx_L3_error)
4586  }
4587  }
4588  if (unlikely(kw_args > 0)) {
4589  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateSubgridError") < 0)) __PYX_ERR(0, 400, __pyx_L3_error)
4590  }
4591  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
4592  goto __pyx_L5_argtuple_error;
4593  } else {
4594  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4595  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4596  }
4597  __pyx_v_self = values[0];
4598  __pyx_v_q = values[1];
4599  }
4600  goto __pyx_L4_argument_unpacking_done;
4601  __pyx_L5_argtuple_error:;
4602  __Pyx_RaiseArgtupleInvalid("calculateSubgridError", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 400, __pyx_L3_error)
4603  __pyx_L3_error:;
4604  __Pyx_AddTraceback("ADR.SubgridError.calculateSubgridError", __pyx_clineno, __pyx_lineno, __pyx_filename);
4605  __Pyx_RefNannyFinishContext();
4606  return NULL;
4607  __pyx_L4_argument_unpacking_done:;
4608  __pyx_r = __pyx_pf_3ADR_12SubgridError_6calculateSubgridError(__pyx_self, __pyx_v_self, __pyx_v_q);
4609 
4610  /* function exit code */
4611  __Pyx_RefNannyFinishContext();
4612  return __pyx_r;
4613 }
4614 
4615 static PyObject *__pyx_pf_3ADR_12SubgridError_6calculateSubgridError(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_q) {
4616  PyObject *__pyx_r = NULL;
4617  __Pyx_RefNannyDeclarations
4618  __Pyx_RefNannySetupContext("calculateSubgridError", 0);
4619 
4620  /* function exit code */
4621  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4622  __Pyx_XGIVEREF(__pyx_r);
4623  __Pyx_RefNannyFinishContext();
4624  return __pyx_r;
4625 }
4626 
4627 /* "ADR.pyx":410
4628  * :parts: 2
4629  * """
4630  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None): # <<<<<<<<<<<<<<
4631  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
4632  * self.nStepsToDelay = nStepsToDelay
4633  */
4634 
4635 /* Python wrapper */
4636 static PyObject *__pyx_pw_3ADR_14ShockCapturing_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4637 static PyMethodDef __pyx_mdef_3ADR_14ShockCapturing_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_14ShockCapturing_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
4638 static PyObject *__pyx_pw_3ADR_14ShockCapturing_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4639  PyObject *__pyx_v_self = 0;
4640  PyObject *__pyx_v_coefficients = 0;
4641  PyObject *__pyx_v_nd = 0;
4642  PyObject *__pyx_v_shockCapturingFactor = 0;
4643  PyObject *__pyx_v_lag = 0;
4644  PyObject *__pyx_v_nStepsToDelay = 0;
4645  PyObject *__pyx_r = 0;
4646  __Pyx_RefNannyDeclarations
4647  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
4648  {
4649  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_coefficients,&__pyx_n_s_nd,&__pyx_n_s_shockCapturingFactor,&__pyx_n_s_lag,&__pyx_n_s_nStepsToDelay,0};
4650  PyObject* values[6] = {0,0,0,0,0,0};
4651  values[3] = ((PyObject *)((PyObject*)__pyx_float_0_25));
4652  values[4] = ((PyObject *)((PyObject *)Py_True));
4653  values[5] = ((PyObject *)((PyObject *)Py_None));
4654  if (unlikely(__pyx_kwds)) {
4655  Py_ssize_t kw_args;
4656  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4657  switch (pos_args) {
4658  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4659  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4660  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4661  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4662  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4663  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4664  case 0: break;
4665  default: goto __pyx_L5_argtuple_error;
4666  }
4667  kw_args = PyDict_Size(__pyx_kwds);
4668  switch (pos_args) {
4669  case 0:
4670  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4671  else goto __pyx_L5_argtuple_error;
4672  case 1:
4673  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
4674  else {
4675  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 6, 1); __PYX_ERR(0, 410, __pyx_L3_error)
4676  }
4677  case 2:
4678  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nd)) != 0)) kw_args--;
4679  else {
4680  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 6, 2); __PYX_ERR(0, 410, __pyx_L3_error)
4681  }
4682  case 3:
4683  if (kw_args > 0) {
4684  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shockCapturingFactor);
4685  if (value) { values[3] = value; kw_args--; }
4686  }
4687  case 4:
4688  if (kw_args > 0) {
4689  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lag);
4690  if (value) { values[4] = value; kw_args--; }
4691  }
4692  case 5:
4693  if (kw_args > 0) {
4694  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nStepsToDelay);
4695  if (value) { values[5] = value; kw_args--; }
4696  }
4697  }
4698  if (unlikely(kw_args > 0)) {
4699  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 410, __pyx_L3_error)
4700  }
4701  } else {
4702  switch (PyTuple_GET_SIZE(__pyx_args)) {
4703  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4704  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4705  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4706  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4707  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4708  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4709  break;
4710  default: goto __pyx_L5_argtuple_error;
4711  }
4712  }
4713  __pyx_v_self = values[0];
4714  __pyx_v_coefficients = values[1];
4715  __pyx_v_nd = values[2];
4716  __pyx_v_shockCapturingFactor = values[3];
4717  __pyx_v_lag = values[4];
4718  __pyx_v_nStepsToDelay = values[5];
4719  }
4720  goto __pyx_L4_argument_unpacking_done;
4721  __pyx_L5_argtuple_error:;
4722  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 410, __pyx_L3_error)
4723  __pyx_L3_error:;
4724  __Pyx_AddTraceback("ADR.ShockCapturing.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4725  __Pyx_RefNannyFinishContext();
4726  return NULL;
4727  __pyx_L4_argument_unpacking_done:;
4728  __pyx_r = __pyx_pf_3ADR_14ShockCapturing___init__(__pyx_self, __pyx_v_self, __pyx_v_coefficients, __pyx_v_nd, __pyx_v_shockCapturingFactor, __pyx_v_lag, __pyx_v_nStepsToDelay);
4729 
4730  /* function exit code */
4731  __Pyx_RefNannyFinishContext();
4732  return __pyx_r;
4733 }
4734 
4735 static PyObject *__pyx_pf_3ADR_14ShockCapturing___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_nd, PyObject *__pyx_v_shockCapturingFactor, PyObject *__pyx_v_lag, PyObject *__pyx_v_nStepsToDelay) {
4736  PyObject *__pyx_r = NULL;
4737  __Pyx_RefNannyDeclarations
4738  PyObject *__pyx_t_1 = NULL;
4739  PyObject *__pyx_t_2 = NULL;
4740  PyObject *__pyx_t_3 = NULL;
4741  int __pyx_t_4;
4742  PyObject *__pyx_t_5 = NULL;
4743  int __pyx_t_6;
4744  __Pyx_RefNannySetupContext("__init__", 0);
4745 
4746  /* "ADR.pyx":411
4747  * """
4748  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None):
4749  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag) # <<<<<<<<<<<<<<
4750  * self.nStepsToDelay = nStepsToDelay
4751  * self.nSteps=0
4752  */
4753  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ShockCapturing_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error)
4754  __Pyx_GOTREF(__pyx_t_2);
4755  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
4756  __Pyx_GOTREF(__pyx_t_3);
4757  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4758  __pyx_t_2 = NULL;
4759  __pyx_t_4 = 0;
4760  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4761  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4762  if (likely(__pyx_t_2)) {
4763  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4764  __Pyx_INCREF(__pyx_t_2);
4765  __Pyx_INCREF(function);
4766  __Pyx_DECREF_SET(__pyx_t_3, function);
4767  __pyx_t_4 = 1;
4768  }
4769  }
4770  #if CYTHON_FAST_PYCALL
4771  if (PyFunction_Check(__pyx_t_3)) {
4772  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_coefficients, __pyx_v_nd, __pyx_v_shockCapturingFactor, __pyx_v_lag};
4773  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
4774  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4775  __Pyx_GOTREF(__pyx_t_1);
4776  } else
4777  #endif
4778  #if CYTHON_FAST_PYCCALL
4779  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
4780  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_coefficients, __pyx_v_nd, __pyx_v_shockCapturingFactor, __pyx_v_lag};
4781  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
4782  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4783  __Pyx_GOTREF(__pyx_t_1);
4784  } else
4785  #endif
4786  {
4787  __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 411, __pyx_L1_error)
4788  __Pyx_GOTREF(__pyx_t_5);
4789  if (__pyx_t_2) {
4790  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
4791  }
4792  __Pyx_INCREF(__pyx_v_self);
4793  __Pyx_GIVEREF(__pyx_v_self);
4794  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
4795  __Pyx_INCREF(__pyx_v_coefficients);
4796  __Pyx_GIVEREF(__pyx_v_coefficients);
4797  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_coefficients);
4798  __Pyx_INCREF(__pyx_v_nd);
4799  __Pyx_GIVEREF(__pyx_v_nd);
4800  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_nd);
4801  __Pyx_INCREF(__pyx_v_shockCapturingFactor);
4802  __Pyx_GIVEREF(__pyx_v_shockCapturingFactor);
4803  PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_shockCapturingFactor);
4804  __Pyx_INCREF(__pyx_v_lag);
4805  __Pyx_GIVEREF(__pyx_v_lag);
4806  PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_lag);
4807  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
4808  __Pyx_GOTREF(__pyx_t_1);
4809  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4810  }
4811  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4812  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4813 
4814  /* "ADR.pyx":412
4815  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None):
4816  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
4817  * self.nStepsToDelay = nStepsToDelay # <<<<<<<<<<<<<<
4818  * self.nSteps=0
4819  * if self.lag:
4820  */
4821  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nStepsToDelay, __pyx_v_nStepsToDelay) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
4822 
4823  /* "ADR.pyx":413
4824  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
4825  * self.nStepsToDelay = nStepsToDelay
4826  * self.nSteps=0 # <<<<<<<<<<<<<<
4827  * if self.lag:
4828  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
4829  */
4830  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nSteps, __pyx_int_0) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
4831 
4832  /* "ADR.pyx":414
4833  * self.nStepsToDelay = nStepsToDelay
4834  * self.nSteps=0
4835  * if self.lag: # <<<<<<<<<<<<<<
4836  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
4837  * self.nStepsToDelay=1
4838  */
4839  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
4840  __Pyx_GOTREF(__pyx_t_1);
4841  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 414, __pyx_L1_error)
4842  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4843  if (__pyx_t_6) {
4844 
4845  /* "ADR.pyx":415
4846  * self.nSteps=0
4847  * if self.lag:
4848  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying") # <<<<<<<<<<<<<<
4849  * self.nStepsToDelay=1
4850  * self.lag=False
4851  */
4852  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error)
4853  __Pyx_GOTREF(__pyx_t_1);
4854  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error)
4855  __Pyx_GOTREF(__pyx_t_3);
4856  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4857  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4858 
4859  /* "ADR.pyx":416
4860  * if self.lag:
4861  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
4862  * self.nStepsToDelay=1 # <<<<<<<<<<<<<<
4863  * self.lag=False
4864  * def initializeElementQuadrature(self,mesh,t,cq):
4865  */
4866  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nStepsToDelay, __pyx_int_1) < 0) __PYX_ERR(0, 416, __pyx_L1_error)
4867 
4868  /* "ADR.pyx":417
4869  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
4870  * self.nStepsToDelay=1
4871  * self.lag=False # <<<<<<<<<<<<<<
4872  * def initializeElementQuadrature(self,mesh,t,cq):
4873  * self.mesh=mesh
4874  */
4875  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lag, Py_False) < 0) __PYX_ERR(0, 417, __pyx_L1_error)
4876 
4877  /* "ADR.pyx":414
4878  * self.nStepsToDelay = nStepsToDelay
4879  * self.nSteps=0
4880  * if self.lag: # <<<<<<<<<<<<<<
4881  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
4882  * self.nStepsToDelay=1
4883  */
4884  }
4885 
4886  /* "ADR.pyx":410
4887  * :parts: 2
4888  * """
4889  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None): # <<<<<<<<<<<<<<
4890  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
4891  * self.nStepsToDelay = nStepsToDelay
4892  */
4893 
4894  /* function exit code */
4895  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4896  goto __pyx_L0;
4897  __pyx_L1_error:;
4898  __Pyx_XDECREF(__pyx_t_1);
4899  __Pyx_XDECREF(__pyx_t_2);
4900  __Pyx_XDECREF(__pyx_t_3);
4901  __Pyx_XDECREF(__pyx_t_5);
4902  __Pyx_AddTraceback("ADR.ShockCapturing.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4903  __pyx_r = NULL;
4904  __pyx_L0:;
4905  __Pyx_XGIVEREF(__pyx_r);
4906  __Pyx_RefNannyFinishContext();
4907  return __pyx_r;
4908 }
4909 
4910 /* "ADR.pyx":418
4911  * self.nStepsToDelay=1
4912  * self.lag=False
4913  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
4914  * self.mesh=mesh
4915  * self.numDiff=[]
4916  */
4917 
4918 /* Python wrapper */
4919 static PyObject *__pyx_pw_3ADR_14ShockCapturing_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4920 static PyMethodDef __pyx_mdef_3ADR_14ShockCapturing_3initializeElementQuadrature = {"initializeElementQuadrature", (PyCFunction)__pyx_pw_3ADR_14ShockCapturing_3initializeElementQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
4921 static PyObject *__pyx_pw_3ADR_14ShockCapturing_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4922  PyObject *__pyx_v_self = 0;
4923  PyObject *__pyx_v_mesh = 0;
4924  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
4925  PyObject *__pyx_v_cq = 0;
4926  PyObject *__pyx_r = 0;
4927  __Pyx_RefNannyDeclarations
4928  __Pyx_RefNannySetupContext("initializeElementQuadrature (wrapper)", 0);
4929  {
4930  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mesh,&__pyx_n_s_t,&__pyx_n_s_cq,0};
4931  PyObject* values[4] = {0,0,0,0};
4932  if (unlikely(__pyx_kwds)) {
4933  Py_ssize_t kw_args;
4934  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4935  switch (pos_args) {
4936  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4937  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4938  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4939  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4940  case 0: break;
4941  default: goto __pyx_L5_argtuple_error;
4942  }
4943  kw_args = PyDict_Size(__pyx_kwds);
4944  switch (pos_args) {
4945  case 0:
4946  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4947  else goto __pyx_L5_argtuple_error;
4948  case 1:
4949  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh)) != 0)) kw_args--;
4950  else {
4951  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 1); __PYX_ERR(0, 418, __pyx_L3_error)
4952  }
4953  case 2:
4954  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
4955  else {
4956  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 2); __PYX_ERR(0, 418, __pyx_L3_error)
4957  }
4958  case 3:
4959  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cq)) != 0)) kw_args--;
4960  else {
4961  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 3); __PYX_ERR(0, 418, __pyx_L3_error)
4962  }
4963  }
4964  if (unlikely(kw_args > 0)) {
4965  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeElementQuadrature") < 0)) __PYX_ERR(0, 418, __pyx_L3_error)
4966  }
4967  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
4968  goto __pyx_L5_argtuple_error;
4969  } else {
4970  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4971  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4972  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4973  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4974  }
4975  __pyx_v_self = values[0];
4976  __pyx_v_mesh = values[1];
4977  __pyx_v_t = values[2];
4978  __pyx_v_cq = values[3];
4979  }
4980  goto __pyx_L4_argument_unpacking_done;
4981  __pyx_L5_argtuple_error:;
4982  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 418, __pyx_L3_error)
4983  __pyx_L3_error:;
4984  __Pyx_AddTraceback("ADR.ShockCapturing.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
4985  __Pyx_RefNannyFinishContext();
4986  return NULL;
4987  __pyx_L4_argument_unpacking_done:;
4988  __pyx_r = __pyx_pf_3ADR_14ShockCapturing_2initializeElementQuadrature(__pyx_self, __pyx_v_self, __pyx_v_mesh, __pyx_v_t, __pyx_v_cq);
4989 
4990  /* function exit code */
4991  __Pyx_RefNannyFinishContext();
4992  return __pyx_r;
4993 }
4994 
4995 static PyObject *__pyx_pf_3ADR_14ShockCapturing_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mesh, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cq) {
4996  PyObject *__pyx_v_ci = NULL;
4997  PyObject *__pyx_r = NULL;
4998  __Pyx_RefNannyDeclarations
4999  PyObject *__pyx_t_1 = NULL;
5000  PyObject *__pyx_t_2 = NULL;
5001  Py_ssize_t __pyx_t_3;
5002  PyObject *(*__pyx_t_4)(PyObject *);
5003  PyObject *__pyx_t_5 = NULL;
5004  PyObject *__pyx_t_6 = NULL;
5005  int __pyx_t_7;
5006  __Pyx_RefNannySetupContext("initializeElementQuadrature", 0);
5007 
5008  /* "ADR.pyx":419
5009  * self.lag=False
5010  * def initializeElementQuadrature(self,mesh,t,cq):
5011  * self.mesh=mesh # <<<<<<<<<<<<<<
5012  * self.numDiff=[]
5013  * self.numDiff_last=[]
5014  */
5015  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mesh, __pyx_v_mesh) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
5016 
5017  /* "ADR.pyx":420
5018  * def initializeElementQuadrature(self,mesh,t,cq):
5019  * self.mesh=mesh
5020  * self.numDiff=[] # <<<<<<<<<<<<<<
5021  * self.numDiff_last=[]
5022  * for ci in range(self.nc):
5023  */
5024  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error)
5025  __Pyx_GOTREF(__pyx_t_1);
5026  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numDiff, __pyx_t_1) < 0) __PYX_ERR(0, 420, __pyx_L1_error)
5027  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5028 
5029  /* "ADR.pyx":421
5030  * self.mesh=mesh
5031  * self.numDiff=[]
5032  * self.numDiff_last=[] # <<<<<<<<<<<<<<
5033  * for ci in range(self.nc):
5034  * self.numDiff.append(cq[('numDiff',ci,ci)])
5035  */
5036  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error)
5037  __Pyx_GOTREF(__pyx_t_1);
5038  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last, __pyx_t_1) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
5039  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5040 
5041  /* "ADR.pyx":422
5042  * self.numDiff=[]
5043  * self.numDiff_last=[]
5044  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5045  * self.numDiff.append(cq[('numDiff',ci,ci)])
5046  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5047  */
5048  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
5049  __Pyx_GOTREF(__pyx_t_1);
5050  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
5051  __Pyx_GOTREF(__pyx_t_2);
5052  __Pyx_GIVEREF(__pyx_t_1);
5053  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
5054  __pyx_t_1 = 0;
5055  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
5056  __Pyx_GOTREF(__pyx_t_1);
5057  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5058  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
5059  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
5060  __pyx_t_4 = NULL;
5061  } else {
5062  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
5063  __Pyx_GOTREF(__pyx_t_2);
5064  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)
5065  }
5066  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5067  for (;;) {
5068  if (likely(!__pyx_t_4)) {
5069  if (likely(PyList_CheckExact(__pyx_t_2))) {
5070  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
5071  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5072  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
5073  #else
5074  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
5075  __Pyx_GOTREF(__pyx_t_1);
5076  #endif
5077  } else {
5078  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
5079  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5080  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
5081  #else
5082  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
5083  __Pyx_GOTREF(__pyx_t_1);
5084  #endif
5085  }
5086  } else {
5087  __pyx_t_1 = __pyx_t_4(__pyx_t_2);
5088  if (unlikely(!__pyx_t_1)) {
5089  PyObject* exc_type = PyErr_Occurred();
5090  if (exc_type) {
5091  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5092  else __PYX_ERR(0, 422, __pyx_L1_error)
5093  }
5094  break;
5095  }
5096  __Pyx_GOTREF(__pyx_t_1);
5097  }
5098  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
5099  __pyx_t_1 = 0;
5100 
5101  /* "ADR.pyx":423
5102  * self.numDiff_last=[]
5103  * for ci in range(self.nc):
5104  * self.numDiff.append(cq[('numDiff',ci,ci)]) # <<<<<<<<<<<<<<
5105  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5106  * def updateShockCapturingHistory(self):
5107  */
5108  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error)
5109  __Pyx_GOTREF(__pyx_t_1);
5110  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L1_error)
5111  __Pyx_GOTREF(__pyx_t_5);
5112  __Pyx_INCREF(__pyx_n_s_numDiff);
5113  __Pyx_GIVEREF(__pyx_n_s_numDiff);
5114  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_numDiff);
5115  __Pyx_INCREF(__pyx_v_ci);
5116  __Pyx_GIVEREF(__pyx_v_ci);
5117  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ci);
5118  __Pyx_INCREF(__pyx_v_ci);
5119  __Pyx_GIVEREF(__pyx_v_ci);
5120  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_ci);
5121  __pyx_t_6 = PyObject_GetItem(__pyx_v_cq, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 423, __pyx_L1_error)
5122  __Pyx_GOTREF(__pyx_t_6);
5123  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5124  __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 423, __pyx_L1_error)
5125  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5126  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5127 
5128  /* "ADR.pyx":424
5129  * for ci in range(self.nc):
5130  * self.numDiff.append(cq[('numDiff',ci,ci)])
5131  * self.numDiff_last.append(cq[('numDiff',ci,ci)]) # <<<<<<<<<<<<<<
5132  * def updateShockCapturingHistory(self):
5133  * self.nSteps += 1
5134  */
5135  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 424, __pyx_L1_error)
5136  __Pyx_GOTREF(__pyx_t_6);
5137  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error)
5138  __Pyx_GOTREF(__pyx_t_1);
5139  __Pyx_INCREF(__pyx_n_s_numDiff);
5140  __Pyx_GIVEREF(__pyx_n_s_numDiff);
5141  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_numDiff);
5142  __Pyx_INCREF(__pyx_v_ci);
5143  __Pyx_GIVEREF(__pyx_v_ci);
5144  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
5145  __Pyx_INCREF(__pyx_v_ci);
5146  __Pyx_GIVEREF(__pyx_v_ci);
5147  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_ci);
5148  __pyx_t_5 = PyObject_GetItem(__pyx_v_cq, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 424, __pyx_L1_error)
5149  __Pyx_GOTREF(__pyx_t_5);
5150  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5151  __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_5); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 424, __pyx_L1_error)
5152  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5153  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5154 
5155  /* "ADR.pyx":422
5156  * self.numDiff=[]
5157  * self.numDiff_last=[]
5158  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5159  * self.numDiff.append(cq[('numDiff',ci,ci)])
5160  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5161  */
5162  }
5163  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5164 
5165  /* "ADR.pyx":418
5166  * self.nStepsToDelay=1
5167  * self.lag=False
5168  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
5169  * self.mesh=mesh
5170  * self.numDiff=[]
5171  */
5172 
5173  /* function exit code */
5174  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5175  goto __pyx_L0;
5176  __pyx_L1_error:;
5177  __Pyx_XDECREF(__pyx_t_1);
5178  __Pyx_XDECREF(__pyx_t_2);
5179  __Pyx_XDECREF(__pyx_t_5);
5180  __Pyx_XDECREF(__pyx_t_6);
5181  __Pyx_AddTraceback("ADR.ShockCapturing.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
5182  __pyx_r = NULL;
5183  __pyx_L0:;
5184  __Pyx_XDECREF(__pyx_v_ci);
5185  __Pyx_XGIVEREF(__pyx_r);
5186  __Pyx_RefNannyFinishContext();
5187  return __pyx_r;
5188 }
5189 
5190 /* "ADR.pyx":425
5191  * self.numDiff.append(cq[('numDiff',ci,ci)])
5192  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5193  * def updateShockCapturingHistory(self): # <<<<<<<<<<<<<<
5194  * self.nSteps += 1
5195  * if self.lag:
5196  */
5197 
5198 /* Python wrapper */
5199 static PyObject *__pyx_pw_3ADR_14ShockCapturing_5updateShockCapturingHistory(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
5200 static PyMethodDef __pyx_mdef_3ADR_14ShockCapturing_5updateShockCapturingHistory = {"updateShockCapturingHistory", (PyCFunction)__pyx_pw_3ADR_14ShockCapturing_5updateShockCapturingHistory, METH_O, 0};
5201 static PyObject *__pyx_pw_3ADR_14ShockCapturing_5updateShockCapturingHistory(PyObject *__pyx_self, PyObject *__pyx_v_self) {
5202  PyObject *__pyx_r = 0;
5203  __Pyx_RefNannyDeclarations
5204  __Pyx_RefNannySetupContext("updateShockCapturingHistory (wrapper)", 0);
5205  __pyx_r = __pyx_pf_3ADR_14ShockCapturing_4updateShockCapturingHistory(__pyx_self, ((PyObject *)__pyx_v_self));
5206 
5207  /* function exit code */
5208  __Pyx_RefNannyFinishContext();
5209  return __pyx_r;
5210 }
5211 
5212 static PyObject *__pyx_pf_3ADR_14ShockCapturing_4updateShockCapturingHistory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
5213  PyObject *__pyx_v_ci = NULL;
5214  PyObject *__pyx_r = NULL;
5215  __Pyx_RefNannyDeclarations
5216  PyObject *__pyx_t_1 = NULL;
5217  PyObject *__pyx_t_2 = NULL;
5218  int __pyx_t_3;
5219  Py_ssize_t __pyx_t_4;
5220  PyObject *(*__pyx_t_5)(PyObject *);
5221  PyObject *__pyx_t_6 = NULL;
5222  PyObject *__pyx_t_7 = NULL;
5223  int __pyx_t_8;
5224  int __pyx_t_9;
5225  PyObject *__pyx_t_10 = NULL;
5226  int __pyx_t_11;
5227  PyObject *__pyx_t_12 = NULL;
5228  PyObject *__pyx_t_13 = NULL;
5229  __Pyx_RefNannySetupContext("updateShockCapturingHistory", 0);
5230 
5231  /* "ADR.pyx":426
5232  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5233  * def updateShockCapturingHistory(self):
5234  * self.nSteps += 1 # <<<<<<<<<<<<<<
5235  * if self.lag:
5236  * for ci in range(self.nc):
5237  */
5238  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSteps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error)
5239  __Pyx_GOTREF(__pyx_t_1);
5240  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error)
5241  __Pyx_GOTREF(__pyx_t_2);
5242  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5243  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nSteps, __pyx_t_2) < 0) __PYX_ERR(0, 426, __pyx_L1_error)
5244  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5245 
5246  /* "ADR.pyx":427
5247  * def updateShockCapturingHistory(self):
5248  * self.nSteps += 1
5249  * if self.lag: # <<<<<<<<<<<<<<
5250  * for ci in range(self.nc):
5251  * self.numDiff_last[ci][:] = self.numDiff[ci]
5252  */
5253  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
5254  __Pyx_GOTREF(__pyx_t_2);
5255  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 427, __pyx_L1_error)
5256  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5257  if (__pyx_t_3) {
5258 
5259  /* "ADR.pyx":428
5260  * self.nSteps += 1
5261  * if self.lag:
5262  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5263  * self.numDiff_last[ci][:] = self.numDiff[ci]
5264  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
5265  */
5266  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
5267  __Pyx_GOTREF(__pyx_t_2);
5268  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
5269  __Pyx_GOTREF(__pyx_t_1);
5270  __Pyx_GIVEREF(__pyx_t_2);
5271  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
5272  __pyx_t_2 = 0;
5273  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
5274  __Pyx_GOTREF(__pyx_t_2);
5275  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5276  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
5277  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
5278  __pyx_t_5 = NULL;
5279  } else {
5280  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
5281  __Pyx_GOTREF(__pyx_t_1);
5282  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error)
5283  }
5284  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5285  for (;;) {
5286  if (likely(!__pyx_t_5)) {
5287  if (likely(PyList_CheckExact(__pyx_t_1))) {
5288  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
5289  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5290  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 428, __pyx_L1_error)
5291  #else
5292  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
5293  __Pyx_GOTREF(__pyx_t_2);
5294  #endif
5295  } else {
5296  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5297  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5298  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 428, __pyx_L1_error)
5299  #else
5300  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
5301  __Pyx_GOTREF(__pyx_t_2);
5302  #endif
5303  }
5304  } else {
5305  __pyx_t_2 = __pyx_t_5(__pyx_t_1);
5306  if (unlikely(!__pyx_t_2)) {
5307  PyObject* exc_type = PyErr_Occurred();
5308  if (exc_type) {
5309  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5310  else __PYX_ERR(0, 428, __pyx_L1_error)
5311  }
5312  break;
5313  }
5314  __Pyx_GOTREF(__pyx_t_2);
5315  }
5316  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_2);
5317  __pyx_t_2 = 0;
5318 
5319  /* "ADR.pyx":429
5320  * if self.lag:
5321  * for ci in range(self.nc):
5322  * self.numDiff_last[ci][:] = self.numDiff[ci] # <<<<<<<<<<<<<<
5323  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
5324  * log("ADR.ShockCapturing: switched to lagged shock capturing")
5325  */
5326  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error)
5327  __Pyx_GOTREF(__pyx_t_2);
5328  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
5329  __Pyx_GOTREF(__pyx_t_6);
5330  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5331  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error)
5332  __Pyx_GOTREF(__pyx_t_2);
5333  __pyx_t_7 = PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L1_error)
5334  __Pyx_GOTREF(__pyx_t_7);
5335  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5336  if (__Pyx_PyObject_SetSlice(__pyx_t_7, __pyx_t_6, 0, 0, NULL, NULL, &__pyx_slice__2, 0, 0, 1) < 0) __PYX_ERR(0, 429, __pyx_L1_error)
5337  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5338  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5339 
5340  /* "ADR.pyx":428
5341  * self.nSteps += 1
5342  * if self.lag:
5343  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5344  * self.numDiff_last[ci][:] = self.numDiff[ci]
5345  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
5346  */
5347  }
5348  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5349 
5350  /* "ADR.pyx":427
5351  * def updateShockCapturingHistory(self):
5352  * self.nSteps += 1
5353  * if self.lag: # <<<<<<<<<<<<<<
5354  * for ci in range(self.nc):
5355  * self.numDiff_last[ci][:] = self.numDiff[ci]
5356  */
5357  }
5358 
5359  /* "ADR.pyx":430
5360  * for ci in range(self.nc):
5361  * self.numDiff_last[ci][:] = self.numDiff[ci]
5362  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay: # <<<<<<<<<<<<<<
5363  * log("ADR.ShockCapturing: switched to lagged shock capturing")
5364  * self.lag = True
5365  */
5366  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
5367  __Pyx_GOTREF(__pyx_t_1);
5368  __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, Py_False, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L1_error)
5369  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5370  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 430, __pyx_L1_error)
5371  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5372  if (__pyx_t_8) {
5373  } else {
5374  __pyx_t_3 = __pyx_t_8;
5375  goto __pyx_L7_bool_binop_done;
5376  }
5377  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nStepsToDelay); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L1_error)
5378  __Pyx_GOTREF(__pyx_t_6);
5379  __pyx_t_8 = (__pyx_t_6 != Py_None);
5380  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5381  __pyx_t_9 = (__pyx_t_8 != 0);
5382  if (__pyx_t_9) {
5383  } else {
5384  __pyx_t_3 = __pyx_t_9;
5385  goto __pyx_L7_bool_binop_done;
5386  }
5387  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSteps); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L1_error)
5388  __Pyx_GOTREF(__pyx_t_6);
5389  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nStepsToDelay); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
5390  __Pyx_GOTREF(__pyx_t_1);
5391  __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 430, __pyx_L1_error)
5392  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5393  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5394  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 430, __pyx_L1_error)
5395  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5396  __pyx_t_3 = __pyx_t_9;
5397  __pyx_L7_bool_binop_done:;
5398  if (__pyx_t_3) {
5399 
5400  /* "ADR.pyx":431
5401  * self.numDiff_last[ci][:] = self.numDiff[ci]
5402  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
5403  * log("ADR.ShockCapturing: switched to lagged shock capturing") # <<<<<<<<<<<<<<
5404  * self.lag = True
5405  * self.numDiff_last=[]
5406  */
5407  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 431, __pyx_L1_error)
5408  __Pyx_GOTREF(__pyx_t_7);
5409  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
5410  __Pyx_GOTREF(__pyx_t_1);
5411  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5412  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5413 
5414  /* "ADR.pyx":432
5415  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
5416  * log("ADR.ShockCapturing: switched to lagged shock capturing")
5417  * self.lag = True # <<<<<<<<<<<<<<
5418  * self.numDiff_last=[]
5419  * for ci in range(self.nc):
5420  */
5421  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lag, Py_True) < 0) __PYX_ERR(0, 432, __pyx_L1_error)
5422 
5423  /* "ADR.pyx":433
5424  * log("ADR.ShockCapturing: switched to lagged shock capturing")
5425  * self.lag = True
5426  * self.numDiff_last=[] # <<<<<<<<<<<<<<
5427  * for ci in range(self.nc):
5428  * self.numDiff_last.append(self.numDiff[ci].copy())
5429  */
5430  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
5431  __Pyx_GOTREF(__pyx_t_1);
5432  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last, __pyx_t_1) < 0) __PYX_ERR(0, 433, __pyx_L1_error)
5433  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5434 
5435  /* "ADR.pyx":434
5436  * self.lag = True
5437  * self.numDiff_last=[]
5438  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5439  * self.numDiff_last.append(self.numDiff[ci].copy())
5440  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
5441  */
5442  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
5443  __Pyx_GOTREF(__pyx_t_1);
5444  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L1_error)
5445  __Pyx_GOTREF(__pyx_t_7);
5446  __Pyx_GIVEREF(__pyx_t_1);
5447  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
5448  __pyx_t_1 = 0;
5449  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
5450  __Pyx_GOTREF(__pyx_t_1);
5451  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5452  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
5453  __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
5454  __pyx_t_5 = NULL;
5455  } else {
5456  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L1_error)
5457  __Pyx_GOTREF(__pyx_t_7);
5458  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 434, __pyx_L1_error)
5459  }
5460  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5461  for (;;) {
5462  if (likely(!__pyx_t_5)) {
5463  if (likely(PyList_CheckExact(__pyx_t_7))) {
5464  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
5465  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5466  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 434, __pyx_L1_error)
5467  #else
5468  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
5469  __Pyx_GOTREF(__pyx_t_1);
5470  #endif
5471  } else {
5472  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
5473  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5474  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 434, __pyx_L1_error)
5475  #else
5476  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
5477  __Pyx_GOTREF(__pyx_t_1);
5478  #endif
5479  }
5480  } else {
5481  __pyx_t_1 = __pyx_t_5(__pyx_t_7);
5482  if (unlikely(!__pyx_t_1)) {
5483  PyObject* exc_type = PyErr_Occurred();
5484  if (exc_type) {
5485  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5486  else __PYX_ERR(0, 434, __pyx_L1_error)
5487  }
5488  break;
5489  }
5490  __Pyx_GOTREF(__pyx_t_1);
5491  }
5492  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
5493  __pyx_t_1 = 0;
5494 
5495  /* "ADR.pyx":435
5496  * self.numDiff_last=[]
5497  * for ci in range(self.nc):
5498  * self.numDiff_last.append(self.numDiff[ci].copy()) # <<<<<<<<<<<<<<
5499  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
5500  *
5501  */
5502  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
5503  __Pyx_GOTREF(__pyx_t_1);
5504  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
5505  __Pyx_GOTREF(__pyx_t_2);
5506  __pyx_t_10 = PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 435, __pyx_L1_error)
5507  __Pyx_GOTREF(__pyx_t_10);
5508  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5509  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
5510  __Pyx_GOTREF(__pyx_t_2);
5511  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5512  __pyx_t_10 = NULL;
5513  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5514  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
5515  if (likely(__pyx_t_10)) {
5516  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5517  __Pyx_INCREF(__pyx_t_10);
5518  __Pyx_INCREF(function);
5519  __Pyx_DECREF_SET(__pyx_t_2, function);
5520  }
5521  }
5522  if (__pyx_t_10) {
5523  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 435, __pyx_L1_error)
5524  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5525  } else {
5526  __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 435, __pyx_L1_error)
5527  }
5528  __Pyx_GOTREF(__pyx_t_6);
5529  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5530  __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 435, __pyx_L1_error)
5531  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5532  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5533 
5534  /* "ADR.pyx":434
5535  * self.lag = True
5536  * self.numDiff_last=[]
5537  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5538  * self.numDiff_last.append(self.numDiff[ci].copy())
5539  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
5540  */
5541  }
5542  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5543 
5544  /* "ADR.pyx":430
5545  * for ci in range(self.nc):
5546  * self.numDiff_last[ci][:] = self.numDiff[ci]
5547  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay: # <<<<<<<<<<<<<<
5548  * log("ADR.ShockCapturing: switched to lagged shock capturing")
5549  * self.lag = True
5550  */
5551  }
5552 
5553  /* "ADR.pyx":436
5554  * for ci in range(self.nc):
5555  * self.numDiff_last.append(self.numDiff[ci].copy())
5556  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),)) # <<<<<<<<<<<<<<
5557  *
5558  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
5559  */
5560  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 436, __pyx_L1_error)
5561  __Pyx_GOTREF(__pyx_t_6);
5562  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_globalMax); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
5563  __Pyx_GOTREF(__pyx_t_2);
5564  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 436, __pyx_L1_error)
5565  __Pyx_GOTREF(__pyx_t_12);
5566  __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_12, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 436, __pyx_L1_error)
5567  __Pyx_GOTREF(__pyx_t_13);
5568  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
5569  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_max); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 436, __pyx_L1_error)
5570  __Pyx_GOTREF(__pyx_t_12);
5571  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5572  __pyx_t_13 = NULL;
5573  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
5574  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
5575  if (likely(__pyx_t_13)) {
5576  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
5577  __Pyx_INCREF(__pyx_t_13);
5578  __Pyx_INCREF(function);
5579  __Pyx_DECREF_SET(__pyx_t_12, function);
5580  }
5581  }
5582  if (__pyx_t_13) {
5583  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 436, __pyx_L1_error)
5584  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5585  } else {
5586  __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 436, __pyx_L1_error)
5587  }
5588  __Pyx_GOTREF(__pyx_t_10);
5589  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
5590  __pyx_t_12 = NULL;
5591  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
5592  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
5593  if (likely(__pyx_t_12)) {
5594  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5595  __Pyx_INCREF(__pyx_t_12);
5596  __Pyx_INCREF(function);
5597  __Pyx_DECREF_SET(__pyx_t_2, function);
5598  }
5599  }
5600  if (!__pyx_t_12) {
5601  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
5602  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5603  __Pyx_GOTREF(__pyx_t_1);
5604  } else {
5605  #if CYTHON_FAST_PYCALL
5606  if (PyFunction_Check(__pyx_t_2)) {
5607  PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
5608  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
5609  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
5610  __Pyx_GOTREF(__pyx_t_1);
5611  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5612  } else
5613  #endif
5614  #if CYTHON_FAST_PYCCALL
5615  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
5616  PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
5617  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
5618  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
5619  __Pyx_GOTREF(__pyx_t_1);
5620  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5621  } else
5622  #endif
5623  {
5624  __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 436, __pyx_L1_error)
5625  __Pyx_GOTREF(__pyx_t_13);
5626  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
5627  __Pyx_GIVEREF(__pyx_t_10);
5628  PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_10);
5629  __pyx_t_10 = 0;
5630  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
5631  __Pyx_GOTREF(__pyx_t_1);
5632  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5633  }
5634  }
5635  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5636  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
5637  __Pyx_GOTREF(__pyx_t_2);
5638  __Pyx_GIVEREF(__pyx_t_1);
5639  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
5640  __pyx_t_1 = 0;
5641  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_VOF_max_numDiff_e, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
5642  __Pyx_GOTREF(__pyx_t_1);
5643  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5644  __pyx_t_2 = NULL;
5645  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
5646  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
5647  if (likely(__pyx_t_2)) {
5648  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
5649  __Pyx_INCREF(__pyx_t_2);
5650  __Pyx_INCREF(function);
5651  __Pyx_DECREF_SET(__pyx_t_6, function);
5652  }
5653  }
5654  if (!__pyx_t_2) {
5655  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L1_error)
5656  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5657  __Pyx_GOTREF(__pyx_t_7);
5658  } else {
5659  #if CYTHON_FAST_PYCALL
5660  if (PyFunction_Check(__pyx_t_6)) {
5661  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_1};
5662  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L1_error)
5663  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5664  __Pyx_GOTREF(__pyx_t_7);
5665  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5666  } else
5667  #endif
5668  #if CYTHON_FAST_PYCCALL
5669  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
5670  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_1};
5671  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L1_error)
5672  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5673  __Pyx_GOTREF(__pyx_t_7);
5674  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5675  } else
5676  #endif
5677  {
5678  __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 436, __pyx_L1_error)
5679  __Pyx_GOTREF(__pyx_t_13);
5680  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2); __pyx_t_2 = NULL;
5681  __Pyx_GIVEREF(__pyx_t_1);
5682  PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_1);
5683  __pyx_t_1 = 0;
5684  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L1_error)
5685  __Pyx_GOTREF(__pyx_t_7);
5686  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5687  }
5688  }
5689  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5690  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5691 
5692  /* "ADR.pyx":425
5693  * self.numDiff.append(cq[('numDiff',ci,ci)])
5694  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5695  * def updateShockCapturingHistory(self): # <<<<<<<<<<<<<<
5696  * self.nSteps += 1
5697  * if self.lag:
5698  */
5699 
5700  /* function exit code */
5701  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5702  goto __pyx_L0;
5703  __pyx_L1_error:;
5704  __Pyx_XDECREF(__pyx_t_1);
5705  __Pyx_XDECREF(__pyx_t_2);
5706  __Pyx_XDECREF(__pyx_t_6);
5707  __Pyx_XDECREF(__pyx_t_7);
5708  __Pyx_XDECREF(__pyx_t_10);
5709  __Pyx_XDECREF(__pyx_t_12);
5710  __Pyx_XDECREF(__pyx_t_13);
5711  __Pyx_AddTraceback("ADR.ShockCapturing.updateShockCapturingHistory", __pyx_clineno, __pyx_lineno, __pyx_filename);
5712  __pyx_r = NULL;
5713  __pyx_L0:;
5714  __Pyx_XDECREF(__pyx_v_ci);
5715  __Pyx_XGIVEREF(__pyx_r);
5716  __Pyx_RefNannyFinishContext();
5717  return __pyx_r;
5718 }
5719 
5720 /* "ADR.pyx":439
5721  *
5722  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
5723  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
5724  * getAdvectiveFluxBoundaryConditions,
5725  * getDiffusiveFluxBoundaryConditions):
5726  */
5727 
5728 /* Python wrapper */
5729 static PyObject *__pyx_pw_3ADR_18NumericalFlux_IIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5730 static PyMethodDef __pyx_mdef_3ADR_18NumericalFlux_IIPG_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_18NumericalFlux_IIPG_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
5731 static PyObject *__pyx_pw_3ADR_18NumericalFlux_IIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5732  PyObject *__pyx_v_self = 0;
5733  PyObject *__pyx_v_vt = 0;
5734  PyObject *__pyx_v_getPointwiseBoundaryConditions = 0;
5735  PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions = 0;
5736  PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions = 0;
5737  PyObject *__pyx_r = 0;
5738  __Pyx_RefNannyDeclarations
5739  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5740  {
5741  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_vt,&__pyx_n_s_getPointwiseBoundaryConditions,&__pyx_n_s_getAdvectiveFluxBoundaryConditio,&__pyx_n_s_getDiffusiveFluxBoundaryConditio,0};
5742  PyObject* values[5] = {0,0,0,0,0};
5743  if (unlikely(__pyx_kwds)) {
5744  Py_ssize_t kw_args;
5745  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5746  switch (pos_args) {
5747  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5748  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5749  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5750  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5751  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5752  case 0: break;
5753  default: goto __pyx_L5_argtuple_error;
5754  }
5755  kw_args = PyDict_Size(__pyx_kwds);
5756  switch (pos_args) {
5757  case 0:
5758  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
5759  else goto __pyx_L5_argtuple_error;
5760  case 1:
5761  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vt)) != 0)) kw_args--;
5762  else {
5763  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 439, __pyx_L3_error)
5764  }
5765  case 2:
5766  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getPointwiseBoundaryConditions)) != 0)) kw_args--;
5767  else {
5768  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 439, __pyx_L3_error)
5769  }
5770  case 3:
5771  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getAdvectiveFluxBoundaryConditio)) != 0)) kw_args--;
5772  else {
5773  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 439, __pyx_L3_error)
5774  }
5775  case 4:
5776  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getDiffusiveFluxBoundaryConditio)) != 0)) kw_args--;
5777  else {
5778  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 439, __pyx_L3_error)
5779  }
5780  }
5781  if (unlikely(kw_args > 0)) {
5782  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 439, __pyx_L3_error)
5783  }
5784  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
5785  goto __pyx_L5_argtuple_error;
5786  } else {
5787  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5788  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5789  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5790  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5791  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5792  }
5793  __pyx_v_self = values[0];
5794  __pyx_v_vt = values[1];
5795  __pyx_v_getPointwiseBoundaryConditions = values[2];
5796  __pyx_v_getAdvectiveFluxBoundaryConditions = values[3];
5797  __pyx_v_getDiffusiveFluxBoundaryConditions = values[4];
5798  }
5799  goto __pyx_L4_argument_unpacking_done;
5800  __pyx_L5_argtuple_error:;
5801  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 439, __pyx_L3_error)
5802  __pyx_L3_error:;
5803  __Pyx_AddTraceback("ADR.NumericalFlux_IIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5804  __Pyx_RefNannyFinishContext();
5805  return NULL;
5806  __pyx_L4_argument_unpacking_done:;
5807  __pyx_r = __pyx_pf_3ADR_18NumericalFlux_IIPG___init__(__pyx_self, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions);
5808 
5809  /* function exit code */
5810  __Pyx_RefNannyFinishContext();
5811  return __pyx_r;
5812 }
5813 
5814 static PyObject *__pyx_pf_3ADR_18NumericalFlux_IIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions) {
5815  PyObject *__pyx_r = NULL;
5816  __Pyx_RefNannyDeclarations
5817  PyObject *__pyx_t_1 = NULL;
5818  PyObject *__pyx_t_2 = NULL;
5819  PyObject *__pyx_t_3 = NULL;
5820  int __pyx_t_4;
5821  PyObject *__pyx_t_5 = NULL;
5822  __Pyx_RefNannySetupContext("__init__", 0);
5823 
5824  /* "ADR.pyx":442
5825  * getAdvectiveFluxBoundaryConditions,
5826  * getDiffusiveFluxBoundaryConditions):
5827  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
5828  * getAdvectiveFluxBoundaryConditions,
5829  * getDiffusiveFluxBoundaryConditions)
5830  */
5831  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error)
5832  __Pyx_GOTREF(__pyx_t_2);
5833  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error)
5834  __Pyx_GOTREF(__pyx_t_3);
5835  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5836  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Advection_DiagonalUpwind_Diffusi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error)
5837  __Pyx_GOTREF(__pyx_t_2);
5838  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5839  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error)
5840  __Pyx_GOTREF(__pyx_t_3);
5841  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5842 
5843  /* "ADR.pyx":444
5844  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions,
5845  * getAdvectiveFluxBoundaryConditions,
5846  * getDiffusiveFluxBoundaryConditions) # <<<<<<<<<<<<<<
5847  *
5848  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
5849  */
5850  __pyx_t_2 = NULL;
5851  __pyx_t_4 = 0;
5852  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
5853  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
5854  if (likely(__pyx_t_2)) {
5855  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5856  __Pyx_INCREF(__pyx_t_2);
5857  __Pyx_INCREF(function);
5858  __Pyx_DECREF_SET(__pyx_t_3, function);
5859  __pyx_t_4 = 1;
5860  }
5861  }
5862  #if CYTHON_FAST_PYCALL
5863  if (PyFunction_Check(__pyx_t_3)) {
5864  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
5865  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
5866  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5867  __Pyx_GOTREF(__pyx_t_1);
5868  } else
5869  #endif
5870  #if CYTHON_FAST_PYCCALL
5871  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5872  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
5873  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
5874  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5875  __Pyx_GOTREF(__pyx_t_1);
5876  } else
5877  #endif
5878  {
5879  __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error)
5880  __Pyx_GOTREF(__pyx_t_5);
5881  if (__pyx_t_2) {
5882  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
5883  }
5884  __Pyx_INCREF(__pyx_v_self);
5885  __Pyx_GIVEREF(__pyx_v_self);
5886  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
5887  __Pyx_INCREF(__pyx_v_vt);
5888  __Pyx_GIVEREF(__pyx_v_vt);
5889  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_vt);
5890  __Pyx_INCREF(__pyx_v_getPointwiseBoundaryConditions);
5891  __Pyx_GIVEREF(__pyx_v_getPointwiseBoundaryConditions);
5892  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_getPointwiseBoundaryConditions);
5893  __Pyx_INCREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
5894  __Pyx_GIVEREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
5895  PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_getAdvectiveFluxBoundaryConditions);
5896  __Pyx_INCREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
5897  __Pyx_GIVEREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
5898  PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_getDiffusiveFluxBoundaryConditions);
5899  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
5900  __Pyx_GOTREF(__pyx_t_1);
5901  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5902  }
5903  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5904  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5905 
5906  /* "ADR.pyx":439
5907  *
5908  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
5909  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
5910  * getAdvectiveFluxBoundaryConditions,
5911  * getDiffusiveFluxBoundaryConditions):
5912  */
5913 
5914  /* function exit code */
5915  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5916  goto __pyx_L0;
5917  __pyx_L1_error:;
5918  __Pyx_XDECREF(__pyx_t_1);
5919  __Pyx_XDECREF(__pyx_t_2);
5920  __Pyx_XDECREF(__pyx_t_3);
5921  __Pyx_XDECREF(__pyx_t_5);
5922  __Pyx_AddTraceback("ADR.NumericalFlux_IIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5923  __pyx_r = NULL;
5924  __pyx_L0:;
5925  __Pyx_XGIVEREF(__pyx_r);
5926  __Pyx_RefNannyFinishContext();
5927  return __pyx_r;
5928 }
5929 
5930 /* "ADR.pyx":447
5931  *
5932  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
5933  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
5934  * getAdvectiveFluxBoundaryConditions,
5935  * getDiffusiveFluxBoundaryConditions):
5936  */
5937 
5938 /* Python wrapper */
5939 static PyObject *__pyx_pw_3ADR_18NumericalFlux_SIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5940 static PyMethodDef __pyx_mdef_3ADR_18NumericalFlux_SIPG_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_18NumericalFlux_SIPG_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
5941 static PyObject *__pyx_pw_3ADR_18NumericalFlux_SIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5942  PyObject *__pyx_v_self = 0;
5943  PyObject *__pyx_v_vt = 0;
5944  PyObject *__pyx_v_getPointwiseBoundaryConditions = 0;
5945  PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions = 0;
5946  PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions = 0;
5947  PyObject *__pyx_r = 0;
5948  __Pyx_RefNannyDeclarations
5949  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5950  {
5951  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_vt,&__pyx_n_s_getPointwiseBoundaryConditions,&__pyx_n_s_getAdvectiveFluxBoundaryConditio,&__pyx_n_s_getDiffusiveFluxBoundaryConditio,0};
5952  PyObject* values[5] = {0,0,0,0,0};
5953  if (unlikely(__pyx_kwds)) {
5954  Py_ssize_t kw_args;
5955  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5956  switch (pos_args) {
5957  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5958  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5959  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5960  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5961  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5962  case 0: break;
5963  default: goto __pyx_L5_argtuple_error;
5964  }
5965  kw_args = PyDict_Size(__pyx_kwds);
5966  switch (pos_args) {
5967  case 0:
5968  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
5969  else goto __pyx_L5_argtuple_error;
5970  case 1:
5971  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vt)) != 0)) kw_args--;
5972  else {
5973  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 447, __pyx_L3_error)
5974  }
5975  case 2:
5976  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getPointwiseBoundaryConditions)) != 0)) kw_args--;
5977  else {
5978  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 447, __pyx_L3_error)
5979  }
5980  case 3:
5981  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getAdvectiveFluxBoundaryConditio)) != 0)) kw_args--;
5982  else {
5983  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 447, __pyx_L3_error)
5984  }
5985  case 4:
5986  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getDiffusiveFluxBoundaryConditio)) != 0)) kw_args--;
5987  else {
5988  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 447, __pyx_L3_error)
5989  }
5990  }
5991  if (unlikely(kw_args > 0)) {
5992  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 447, __pyx_L3_error)
5993  }
5994  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
5995  goto __pyx_L5_argtuple_error;
5996  } else {
5997  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5998  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5999  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6000  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6001  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6002  }
6003  __pyx_v_self = values[0];
6004  __pyx_v_vt = values[1];
6005  __pyx_v_getPointwiseBoundaryConditions = values[2];
6006  __pyx_v_getAdvectiveFluxBoundaryConditions = values[3];
6007  __pyx_v_getDiffusiveFluxBoundaryConditions = values[4];
6008  }
6009  goto __pyx_L4_argument_unpacking_done;
6010  __pyx_L5_argtuple_error:;
6011  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 447, __pyx_L3_error)
6012  __pyx_L3_error:;
6013  __Pyx_AddTraceback("ADR.NumericalFlux_SIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6014  __Pyx_RefNannyFinishContext();
6015  return NULL;
6016  __pyx_L4_argument_unpacking_done:;
6017  __pyx_r = __pyx_pf_3ADR_18NumericalFlux_SIPG___init__(__pyx_self, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions);
6018 
6019  /* function exit code */
6020  __Pyx_RefNannyFinishContext();
6021  return __pyx_r;
6022 }
6023 
6024 static PyObject *__pyx_pf_3ADR_18NumericalFlux_SIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions) {
6025  PyObject *__pyx_r = NULL;
6026  __Pyx_RefNannyDeclarations
6027  PyObject *__pyx_t_1 = NULL;
6028  PyObject *__pyx_t_2 = NULL;
6029  PyObject *__pyx_t_3 = NULL;
6030  int __pyx_t_4;
6031  PyObject *__pyx_t_5 = NULL;
6032  __Pyx_RefNannySetupContext("__init__", 0);
6033 
6034  /* "ADR.pyx":450
6035  * getAdvectiveFluxBoundaryConditions,
6036  * getDiffusiveFluxBoundaryConditions):
6037  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6038  * getAdvectiveFluxBoundaryConditions,
6039  * getDiffusiveFluxBoundaryConditions)
6040  */
6041  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error)
6042  __Pyx_GOTREF(__pyx_t_2);
6043  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error)
6044  __Pyx_GOTREF(__pyx_t_3);
6045  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6046  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Advection_DiagonalUpwind_Diffusi_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error)
6047  __Pyx_GOTREF(__pyx_t_2);
6048  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6049  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error)
6050  __Pyx_GOTREF(__pyx_t_3);
6051  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6052 
6053  /* "ADR.pyx":452
6054  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions,
6055  * getAdvectiveFluxBoundaryConditions,
6056  * getDiffusiveFluxBoundaryConditions) # <<<<<<<<<<<<<<
6057  *
6058  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
6059  */
6060  __pyx_t_2 = NULL;
6061  __pyx_t_4 = 0;
6062  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
6063  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
6064  if (likely(__pyx_t_2)) {
6065  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6066  __Pyx_INCREF(__pyx_t_2);
6067  __Pyx_INCREF(function);
6068  __Pyx_DECREF_SET(__pyx_t_3, function);
6069  __pyx_t_4 = 1;
6070  }
6071  }
6072  #if CYTHON_FAST_PYCALL
6073  if (PyFunction_Check(__pyx_t_3)) {
6074  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6075  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
6076  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6077  __Pyx_GOTREF(__pyx_t_1);
6078  } else
6079  #endif
6080  #if CYTHON_FAST_PYCCALL
6081  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
6082  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6083  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
6084  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6085  __Pyx_GOTREF(__pyx_t_1);
6086  } else
6087  #endif
6088  {
6089  __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L1_error)
6090  __Pyx_GOTREF(__pyx_t_5);
6091  if (__pyx_t_2) {
6092  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
6093  }
6094  __Pyx_INCREF(__pyx_v_self);
6095  __Pyx_GIVEREF(__pyx_v_self);
6096  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
6097  __Pyx_INCREF(__pyx_v_vt);
6098  __Pyx_GIVEREF(__pyx_v_vt);
6099  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_vt);
6100  __Pyx_INCREF(__pyx_v_getPointwiseBoundaryConditions);
6101  __Pyx_GIVEREF(__pyx_v_getPointwiseBoundaryConditions);
6102  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_getPointwiseBoundaryConditions);
6103  __Pyx_INCREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6104  __Pyx_GIVEREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6105  PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_getAdvectiveFluxBoundaryConditions);
6106  __Pyx_INCREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6107  __Pyx_GIVEREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6108  PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_getDiffusiveFluxBoundaryConditions);
6109  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
6110  __Pyx_GOTREF(__pyx_t_1);
6111  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6112  }
6113  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6114  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6115 
6116  /* "ADR.pyx":447
6117  *
6118  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
6119  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6120  * getAdvectiveFluxBoundaryConditions,
6121  * getDiffusiveFluxBoundaryConditions):
6122  */
6123 
6124  /* function exit code */
6125  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6126  goto __pyx_L0;
6127  __pyx_L1_error:;
6128  __Pyx_XDECREF(__pyx_t_1);
6129  __Pyx_XDECREF(__pyx_t_2);
6130  __Pyx_XDECREF(__pyx_t_3);
6131  __Pyx_XDECREF(__pyx_t_5);
6132  __Pyx_AddTraceback("ADR.NumericalFlux_SIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6133  __pyx_r = NULL;
6134  __pyx_L0:;
6135  __Pyx_XGIVEREF(__pyx_r);
6136  __Pyx_RefNannyFinishContext();
6137  return __pyx_r;
6138 }
6139 
6140 /* "ADR.pyx":455
6141  *
6142  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
6143  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6144  * getAdvectiveFluxBoundaryConditions,
6145  * getDiffusiveFluxBoundaryConditions):
6146  */
6147 
6148 /* Python wrapper */
6149 static PyObject *__pyx_pw_3ADR_18NumericalFlux_NIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6150 static PyMethodDef __pyx_mdef_3ADR_18NumericalFlux_NIPG_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_18NumericalFlux_NIPG_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
6151 static PyObject *__pyx_pw_3ADR_18NumericalFlux_NIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6152  PyObject *__pyx_v_self = 0;
6153  PyObject *__pyx_v_vt = 0;
6154  PyObject *__pyx_v_getPointwiseBoundaryConditions = 0;
6155  PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions = 0;
6156  PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions = 0;
6157  PyObject *__pyx_r = 0;
6158  __Pyx_RefNannyDeclarations
6159  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6160  {
6161  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_vt,&__pyx_n_s_getPointwiseBoundaryConditions,&__pyx_n_s_getAdvectiveFluxBoundaryConditio,&__pyx_n_s_getDiffusiveFluxBoundaryConditio,0};
6162  PyObject* values[5] = {0,0,0,0,0};
6163  if (unlikely(__pyx_kwds)) {
6164  Py_ssize_t kw_args;
6165  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6166  switch (pos_args) {
6167  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6168  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6169  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6170  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6171  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6172  case 0: break;
6173  default: goto __pyx_L5_argtuple_error;
6174  }
6175  kw_args = PyDict_Size(__pyx_kwds);
6176  switch (pos_args) {
6177  case 0:
6178  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
6179  else goto __pyx_L5_argtuple_error;
6180  case 1:
6181  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vt)) != 0)) kw_args--;
6182  else {
6183  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 455, __pyx_L3_error)
6184  }
6185  case 2:
6186  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getPointwiseBoundaryConditions)) != 0)) kw_args--;
6187  else {
6188  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 455, __pyx_L3_error)
6189  }
6190  case 3:
6191  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getAdvectiveFluxBoundaryConditio)) != 0)) kw_args--;
6192  else {
6193  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 455, __pyx_L3_error)
6194  }
6195  case 4:
6196  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getDiffusiveFluxBoundaryConditio)) != 0)) kw_args--;
6197  else {
6198  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 455, __pyx_L3_error)
6199  }
6200  }
6201  if (unlikely(kw_args > 0)) {
6202  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 455, __pyx_L3_error)
6203  }
6204  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
6205  goto __pyx_L5_argtuple_error;
6206  } else {
6207  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6208  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6209  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6210  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6211  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6212  }
6213  __pyx_v_self = values[0];
6214  __pyx_v_vt = values[1];
6215  __pyx_v_getPointwiseBoundaryConditions = values[2];
6216  __pyx_v_getAdvectiveFluxBoundaryConditions = values[3];
6217  __pyx_v_getDiffusiveFluxBoundaryConditions = values[4];
6218  }
6219  goto __pyx_L4_argument_unpacking_done;
6220  __pyx_L5_argtuple_error:;
6221  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 455, __pyx_L3_error)
6222  __pyx_L3_error:;
6223  __Pyx_AddTraceback("ADR.NumericalFlux_NIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6224  __Pyx_RefNannyFinishContext();
6225  return NULL;
6226  __pyx_L4_argument_unpacking_done:;
6227  __pyx_r = __pyx_pf_3ADR_18NumericalFlux_NIPG___init__(__pyx_self, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions);
6228 
6229  /* function exit code */
6230  __Pyx_RefNannyFinishContext();
6231  return __pyx_r;
6232 }
6233 
6234 static PyObject *__pyx_pf_3ADR_18NumericalFlux_NIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions) {
6235  PyObject *__pyx_r = NULL;
6236  __Pyx_RefNannyDeclarations
6237  PyObject *__pyx_t_1 = NULL;
6238  PyObject *__pyx_t_2 = NULL;
6239  PyObject *__pyx_t_3 = NULL;
6240  int __pyx_t_4;
6241  PyObject *__pyx_t_5 = NULL;
6242  __Pyx_RefNannySetupContext("__init__", 0);
6243 
6244  /* "ADR.pyx":458
6245  * getAdvectiveFluxBoundaryConditions,
6246  * getDiffusiveFluxBoundaryConditions):
6247  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6248  * getAdvectiveFluxBoundaryConditions,
6249  * getDiffusiveFluxBoundaryConditions)
6250  */
6251  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error)
6252  __Pyx_GOTREF(__pyx_t_2);
6253  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error)
6254  __Pyx_GOTREF(__pyx_t_3);
6255  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6256  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Advection_DiagonalUpwind_Diffusi_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error)
6257  __Pyx_GOTREF(__pyx_t_2);
6258  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6259  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error)
6260  __Pyx_GOTREF(__pyx_t_3);
6261  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6262 
6263  /* "ADR.pyx":460
6264  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions,
6265  * getAdvectiveFluxBoundaryConditions,
6266  * getDiffusiveFluxBoundaryConditions) # <<<<<<<<<<<<<<
6267  *
6268  * NumericalFlux = NumericalFlux_SIPG
6269  */
6270  __pyx_t_2 = NULL;
6271  __pyx_t_4 = 0;
6272  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
6273  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
6274  if (likely(__pyx_t_2)) {
6275  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6276  __Pyx_INCREF(__pyx_t_2);
6277  __Pyx_INCREF(function);
6278  __Pyx_DECREF_SET(__pyx_t_3, function);
6279  __pyx_t_4 = 1;
6280  }
6281  }
6282  #if CYTHON_FAST_PYCALL
6283  if (PyFunction_Check(__pyx_t_3)) {
6284  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6285  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
6286  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6287  __Pyx_GOTREF(__pyx_t_1);
6288  } else
6289  #endif
6290  #if CYTHON_FAST_PYCCALL
6291  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
6292  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6293  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
6294  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6295  __Pyx_GOTREF(__pyx_t_1);
6296  } else
6297  #endif
6298  {
6299  __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 458, __pyx_L1_error)
6300  __Pyx_GOTREF(__pyx_t_5);
6301  if (__pyx_t_2) {
6302  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
6303  }
6304  __Pyx_INCREF(__pyx_v_self);
6305  __Pyx_GIVEREF(__pyx_v_self);
6306  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
6307  __Pyx_INCREF(__pyx_v_vt);
6308  __Pyx_GIVEREF(__pyx_v_vt);
6309  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_vt);
6310  __Pyx_INCREF(__pyx_v_getPointwiseBoundaryConditions);
6311  __Pyx_GIVEREF(__pyx_v_getPointwiseBoundaryConditions);
6312  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_getPointwiseBoundaryConditions);
6313  __Pyx_INCREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6314  __Pyx_GIVEREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6315  PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_getAdvectiveFluxBoundaryConditions);
6316  __Pyx_INCREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6317  __Pyx_GIVEREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6318  PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_getDiffusiveFluxBoundaryConditions);
6319  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
6320  __Pyx_GOTREF(__pyx_t_1);
6321  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6322  }
6323  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6324  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6325 
6326  /* "ADR.pyx":455
6327  *
6328  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
6329  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6330  * getAdvectiveFluxBoundaryConditions,
6331  * getDiffusiveFluxBoundaryConditions):
6332  */
6333 
6334  /* function exit code */
6335  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6336  goto __pyx_L0;
6337  __pyx_L1_error:;
6338  __Pyx_XDECREF(__pyx_t_1);
6339  __Pyx_XDECREF(__pyx_t_2);
6340  __Pyx_XDECREF(__pyx_t_3);
6341  __Pyx_XDECREF(__pyx_t_5);
6342  __Pyx_AddTraceback("ADR.NumericalFlux_NIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6343  __pyx_r = NULL;
6344  __pyx_L0:;
6345  __Pyx_XGIVEREF(__pyx_r);
6346  __Pyx_RefNannyFinishContext();
6347  return __pyx_r;
6348 }
6349 
6350 /* "ADR.pyx":472
6351  * """
6352  * from proteus.ctransportCoefficients import L2projectEvaluate
6353  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
6354  * timeVaryingCoefficients=False,
6355  * forceStrongDirichlet=False,
6356  */
6357 
6358 /* Python wrapper */
6359 static PyObject *__pyx_pw_3ADR_12Coefficients_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6360 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_12Coefficients_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
6361 static PyObject *__pyx_pw_3ADR_12Coefficients_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6362  PyObject *__pyx_v_self = 0;
6363  PyObject *__pyx_v_aOfX = 0;
6364  PyObject *__pyx_v_fOfX = 0;
6365  PyObject *__pyx_v_velocity = 0;
6366  PyObject *__pyx_v_nc = 0;
6367  PyObject *__pyx_v_nd = 0;
6368  PyObject *__pyx_v_l2proj = 0;
6369  PyObject *__pyx_v_timeVaryingCoefficients = 0;
6370  PyObject *__pyx_v_forceStrongDirichlet = 0;
6371  PyObject *__pyx_v_useMetrics = 0;
6372  PyObject *__pyx_v_sc_uref = 0;
6373  PyObject *__pyx_v_sc_beta = 0;
6374  PyObject *__pyx_r = 0;
6375  __Pyx_RefNannyDeclarations
6376  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6377  {
6378  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_aOfX,&__pyx_n_s_fOfX,&__pyx_n_s_velocity,&__pyx_n_s_nc,&__pyx_n_s_nd,&__pyx_n_s_l2proj,&__pyx_n_s_timeVaryingCoefficients,&__pyx_n_s_forceStrongDirichlet,&__pyx_n_s_useMetrics,&__pyx_n_s_sc_uref,&__pyx_n_s_sc_beta,0};
6379  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
6380  values[3] = ((PyObject *)((PyObject *)Py_None));
6381  values[4] = ((PyObject *)((PyObject *)__pyx_int_1));
6382  values[5] = ((PyObject *)((PyObject *)__pyx_int_2));
6383  values[6] = ((PyObject *)((PyObject *)Py_None));
6384 
6385  /* "ADR.pyx":473
6386  * from proteus.ctransportCoefficients import L2projectEvaluate
6387  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None,
6388  * timeVaryingCoefficients=False, # <<<<<<<<<<<<<<
6389  * forceStrongDirichlet=False,
6390  * useMetrics=0.0,
6391  */
6392  values[7] = ((PyObject *)((PyObject *)Py_False));
6393 
6394  /* "ADR.pyx":474
6395  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None,
6396  * timeVaryingCoefficients=False,
6397  * forceStrongDirichlet=False, # <<<<<<<<<<<<<<
6398  * useMetrics=0.0,
6399  * sc_uref=1.0,
6400  */
6401  values[8] = ((PyObject *)((PyObject *)Py_False));
6402  values[9] = ((PyObject *)((PyObject*)__pyx_float_0_0));
6403  values[10] = ((PyObject *)((PyObject*)__pyx_float_1_0));
6404  values[11] = ((PyObject *)((PyObject*)__pyx_float_1_0));
6405  if (unlikely(__pyx_kwds)) {
6406  Py_ssize_t kw_args;
6407  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6408  switch (pos_args) {
6409  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
6410  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
6411  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
6412  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6413  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6414  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6415  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6416  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6417  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6418  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6419  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6420  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6421  case 0: break;
6422  default: goto __pyx_L5_argtuple_error;
6423  }
6424  kw_args = PyDict_Size(__pyx_kwds);
6425  switch (pos_args) {
6426  case 0:
6427  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
6428  else goto __pyx_L5_argtuple_error;
6429  case 1:
6430  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_aOfX)) != 0)) kw_args--;
6431  else {
6432  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 12, 1); __PYX_ERR(0, 472, __pyx_L3_error)
6433  }
6434  case 2:
6435  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fOfX)) != 0)) kw_args--;
6436  else {
6437  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 12, 2); __PYX_ERR(0, 472, __pyx_L3_error)
6438  }
6439  case 3:
6440  if (kw_args > 0) {
6441  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_velocity);
6442  if (value) { values[3] = value; kw_args--; }
6443  }
6444  case 4:
6445  if (kw_args > 0) {
6446  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nc);
6447  if (value) { values[4] = value; kw_args--; }
6448  }
6449  case 5:
6450  if (kw_args > 0) {
6451  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nd);
6452  if (value) { values[5] = value; kw_args--; }
6453  }
6454  case 6:
6455  if (kw_args > 0) {
6456  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l2proj);
6457  if (value) { values[6] = value; kw_args--; }
6458  }
6459  case 7:
6460  if (kw_args > 0) {
6461  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_timeVaryingCoefficients);
6462  if (value) { values[7] = value; kw_args--; }
6463  }
6464  case 8:
6465  if (kw_args > 0) {
6466  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_forceStrongDirichlet);
6467  if (value) { values[8] = value; kw_args--; }
6468  }
6469  case 9:
6470  if (kw_args > 0) {
6471  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_useMetrics);
6472  if (value) { values[9] = value; kw_args--; }
6473  }
6474  case 10:
6475  if (kw_args > 0) {
6476  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sc_uref);
6477  if (value) { values[10] = value; kw_args--; }
6478  }
6479  case 11:
6480  if (kw_args > 0) {
6481  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sc_beta);
6482  if (value) { values[11] = value; kw_args--; }
6483  }
6484  }
6485  if (unlikely(kw_args > 0)) {
6486  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 472, __pyx_L3_error)
6487  }
6488  } else {
6489  switch (PyTuple_GET_SIZE(__pyx_args)) {
6490  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
6491  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
6492  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
6493  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6494  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6495  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6496  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6497  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6498  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6499  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6500  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6501  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6502  break;
6503  default: goto __pyx_L5_argtuple_error;
6504  }
6505  }
6506  __pyx_v_self = values[0];
6507  __pyx_v_aOfX = values[1];
6508  __pyx_v_fOfX = values[2];
6509  __pyx_v_velocity = values[3];
6510  __pyx_v_nc = values[4];
6511  __pyx_v_nd = values[5];
6512  __pyx_v_l2proj = values[6];
6513  __pyx_v_timeVaryingCoefficients = values[7];
6514  __pyx_v_forceStrongDirichlet = values[8];
6515  __pyx_v_useMetrics = values[9];
6516  __pyx_v_sc_uref = values[10];
6517  __pyx_v_sc_beta = values[11];
6518  }
6519  goto __pyx_L4_argument_unpacking_done;
6520  __pyx_L5_argtuple_error:;
6521  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 472, __pyx_L3_error)
6522  __pyx_L3_error:;
6523  __Pyx_AddTraceback("ADR.Coefficients.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6524  __Pyx_RefNannyFinishContext();
6525  return NULL;
6526  __pyx_L4_argument_unpacking_done:;
6527  __pyx_r = __pyx_pf_3ADR_12Coefficients___init__(__pyx_self, __pyx_v_self, __pyx_v_aOfX, __pyx_v_fOfX, __pyx_v_velocity, __pyx_v_nc, __pyx_v_nd, __pyx_v_l2proj, __pyx_v_timeVaryingCoefficients, __pyx_v_forceStrongDirichlet, __pyx_v_useMetrics, __pyx_v_sc_uref, __pyx_v_sc_beta);
6528 
6529  /* "ADR.pyx":472
6530  * """
6531  * from proteus.ctransportCoefficients import L2projectEvaluate
6532  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
6533  * timeVaryingCoefficients=False,
6534  * forceStrongDirichlet=False,
6535  */
6536 
6537  /* function exit code */
6538  __Pyx_RefNannyFinishContext();
6539  return __pyx_r;
6540 }
6541 
6542 static PyObject *__pyx_pf_3ADR_12Coefficients___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_aOfX, PyObject *__pyx_v_fOfX, PyObject *__pyx_v_velocity, PyObject *__pyx_v_nc, PyObject *__pyx_v_nd, PyObject *__pyx_v_l2proj, PyObject *__pyx_v_timeVaryingCoefficients, PyObject *__pyx_v_forceStrongDirichlet, PyObject *__pyx_v_useMetrics, PyObject *__pyx_v_sc_uref, PyObject *__pyx_v_sc_beta) {
6543  PyObject *__pyx_v_mass = NULL;
6544  PyObject *__pyx_v_advection = NULL;
6545  PyObject *__pyx_v_diffusion = NULL;
6546  PyObject *__pyx_v_potential = NULL;
6547  PyObject *__pyx_v_reaction = NULL;
6548  PyObject *__pyx_v_hamiltonian = NULL;
6549  PyObject *__pyx_v_i = NULL;
6550  PyObject *__pyx_v_sdInfo = NULL;
6551  CYTHON_UNUSED PyObject *__pyx_v_row = NULL;
6552  PyObject *__pyx_r = NULL;
6553  __Pyx_RefNannyDeclarations
6554  PyObject *__pyx_t_1 = NULL;
6555  PyObject *__pyx_t_2 = NULL;
6556  Py_ssize_t __pyx_t_3;
6557  PyObject *(*__pyx_t_4)(PyObject *);
6558  PyObject *__pyx_t_5 = NULL;
6559  PyObject *__pyx_t_6 = NULL;
6560  PyObject *__pyx_t_7 = NULL;
6561  PyObject *__pyx_t_8 = NULL;
6562  PyObject *__pyx_t_9 = NULL;
6563  __Pyx_RefNannySetupContext("__init__", 0);
6564 
6565  /* "ADR.pyx":478
6566  * sc_uref=1.0,
6567  * sc_beta=1.0):
6568  * self.useMetrics = useMetrics # <<<<<<<<<<<<<<
6569  * self.forceStrongDirichlet=forceStrongDirichlet
6570  * self.aOfX = aOfX
6571  */
6572  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_useMetrics, __pyx_v_useMetrics) < 0) __PYX_ERR(0, 478, __pyx_L1_error)
6573 
6574  /* "ADR.pyx":479
6575  * sc_beta=1.0):
6576  * self.useMetrics = useMetrics
6577  * self.forceStrongDirichlet=forceStrongDirichlet # <<<<<<<<<<<<<<
6578  * self.aOfX = aOfX
6579  * self.fOfX = fOfX
6580  */
6581  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_forceStrongDirichlet, __pyx_v_forceStrongDirichlet) < 0) __PYX_ERR(0, 479, __pyx_L1_error)
6582 
6583  /* "ADR.pyx":480
6584  * self.useMetrics = useMetrics
6585  * self.forceStrongDirichlet=forceStrongDirichlet
6586  * self.aOfX = aOfX # <<<<<<<<<<<<<<
6587  * self.fOfX = fOfX
6588  * self.velocity=velocity
6589  */
6590  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_aOfX, __pyx_v_aOfX) < 0) __PYX_ERR(0, 480, __pyx_L1_error)
6591 
6592  /* "ADR.pyx":481
6593  * self.forceStrongDirichlet=forceStrongDirichlet
6594  * self.aOfX = aOfX
6595  * self.fOfX = fOfX # <<<<<<<<<<<<<<
6596  * self.velocity=velocity
6597  * self.nd = nd
6598  */
6599  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fOfX, __pyx_v_fOfX) < 0) __PYX_ERR(0, 481, __pyx_L1_error)
6600 
6601  /* "ADR.pyx":482
6602  * self.aOfX = aOfX
6603  * self.fOfX = fOfX
6604  * self.velocity=velocity # <<<<<<<<<<<<<<
6605  * self.nd = nd
6606  * self.l2proj = l2proj
6607  */
6608  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_velocity, __pyx_v_velocity) < 0) __PYX_ERR(0, 482, __pyx_L1_error)
6609 
6610  /* "ADR.pyx":483
6611  * self.fOfX = fOfX
6612  * self.velocity=velocity
6613  * self.nd = nd # <<<<<<<<<<<<<<
6614  * self.l2proj = l2proj
6615  * self.timeVaryingCoefficients=timeVaryingCoefficients
6616  */
6617  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nd, __pyx_v_nd) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
6618 
6619  /* "ADR.pyx":484
6620  * self.velocity=velocity
6621  * self.nd = nd
6622  * self.l2proj = l2proj # <<<<<<<<<<<<<<
6623  * self.timeVaryingCoefficients=timeVaryingCoefficients
6624  * self.sc_uref=sc_uref
6625  */
6626  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_l2proj, __pyx_v_l2proj) < 0) __PYX_ERR(0, 484, __pyx_L1_error)
6627 
6628  /* "ADR.pyx":485
6629  * self.nd = nd
6630  * self.l2proj = l2proj
6631  * self.timeVaryingCoefficients=timeVaryingCoefficients # <<<<<<<<<<<<<<
6632  * self.sc_uref=sc_uref
6633  * self.sc_beta=sc_beta
6634  */
6635  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timeVaryingCoefficients, __pyx_v_timeVaryingCoefficients) < 0) __PYX_ERR(0, 485, __pyx_L1_error)
6636 
6637  /* "ADR.pyx":486
6638  * self.l2proj = l2proj
6639  * self.timeVaryingCoefficients=timeVaryingCoefficients
6640  * self.sc_uref=sc_uref # <<<<<<<<<<<<<<
6641  * self.sc_beta=sc_beta
6642  * mass = {}
6643  */
6644  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sc_uref, __pyx_v_sc_uref) < 0) __PYX_ERR(0, 486, __pyx_L1_error)
6645 
6646  /* "ADR.pyx":487
6647  * self.timeVaryingCoefficients=timeVaryingCoefficients
6648  * self.sc_uref=sc_uref
6649  * self.sc_beta=sc_beta # <<<<<<<<<<<<<<
6650  * mass = {}
6651  * advection = {}
6652  */
6653  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sc_beta, __pyx_v_sc_beta) < 0) __PYX_ERR(0, 487, __pyx_L1_error)
6654 
6655  /* "ADR.pyx":488
6656  * self.sc_uref=sc_uref
6657  * self.sc_beta=sc_beta
6658  * mass = {} # <<<<<<<<<<<<<<
6659  * advection = {}
6660  * diffusion = {}
6661  */
6662  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
6663  __Pyx_GOTREF(__pyx_t_1);
6664  __pyx_v_mass = ((PyObject*)__pyx_t_1);
6665  __pyx_t_1 = 0;
6666 
6667  /* "ADR.pyx":489
6668  * self.sc_beta=sc_beta
6669  * mass = {}
6670  * advection = {} # <<<<<<<<<<<<<<
6671  * diffusion = {}
6672  * potential = {}
6673  */
6674  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
6675  __Pyx_GOTREF(__pyx_t_1);
6676  __pyx_v_advection = ((PyObject*)__pyx_t_1);
6677  __pyx_t_1 = 0;
6678 
6679  /* "ADR.pyx":490
6680  * mass = {}
6681  * advection = {}
6682  * diffusion = {} # <<<<<<<<<<<<<<
6683  * potential = {}
6684  * reaction = {}
6685  */
6686  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error)
6687  __Pyx_GOTREF(__pyx_t_1);
6688  __pyx_v_diffusion = ((PyObject*)__pyx_t_1);
6689  __pyx_t_1 = 0;
6690 
6691  /* "ADR.pyx":491
6692  * advection = {}
6693  * diffusion = {}
6694  * potential = {} # <<<<<<<<<<<<<<
6695  * reaction = {}
6696  * hamiltonian = {}
6697  */
6698  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
6699  __Pyx_GOTREF(__pyx_t_1);
6700  __pyx_v_potential = ((PyObject*)__pyx_t_1);
6701  __pyx_t_1 = 0;
6702 
6703  /* "ADR.pyx":492
6704  * diffusion = {}
6705  * potential = {}
6706  * reaction = {} # <<<<<<<<<<<<<<
6707  * hamiltonian = {}
6708  * for i in range(nc):
6709  */
6710  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error)
6711  __Pyx_GOTREF(__pyx_t_1);
6712  __pyx_v_reaction = ((PyObject*)__pyx_t_1);
6713  __pyx_t_1 = 0;
6714 
6715  /* "ADR.pyx":493
6716  * potential = {}
6717  * reaction = {}
6718  * hamiltonian = {} # <<<<<<<<<<<<<<
6719  * for i in range(nc):
6720  * diffusion[i] = {i : {i:'constant'}}
6721  */
6722  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
6723  __Pyx_GOTREF(__pyx_t_1);
6724  __pyx_v_hamiltonian = ((PyObject*)__pyx_t_1);
6725  __pyx_t_1 = 0;
6726 
6727  /* "ADR.pyx":494
6728  * reaction = {}
6729  * hamiltonian = {}
6730  * for i in range(nc): # <<<<<<<<<<<<<<
6731  * diffusion[i] = {i : {i:'constant'}}
6732  * reaction[i] = {i : 'constant'}
6733  */
6734  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
6735  __Pyx_GOTREF(__pyx_t_1);
6736  __Pyx_INCREF(__pyx_v_nc);
6737  __Pyx_GIVEREF(__pyx_v_nc);
6738  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_nc);
6739  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
6740  __Pyx_GOTREF(__pyx_t_2);
6741  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6742  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
6743  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
6744  __pyx_t_4 = NULL;
6745  } else {
6746  __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
6747  __Pyx_GOTREF(__pyx_t_1);
6748  __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 494, __pyx_L1_error)
6749  }
6750  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6751  for (;;) {
6752  if (likely(!__pyx_t_4)) {
6753  if (likely(PyList_CheckExact(__pyx_t_1))) {
6754  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
6755  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6756  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 494, __pyx_L1_error)
6757  #else
6758  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
6759  __Pyx_GOTREF(__pyx_t_2);
6760  #endif
6761  } else {
6762  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
6763  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6764  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 494, __pyx_L1_error)
6765  #else
6766  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
6767  __Pyx_GOTREF(__pyx_t_2);
6768  #endif
6769  }
6770  } else {
6771  __pyx_t_2 = __pyx_t_4(__pyx_t_1);
6772  if (unlikely(!__pyx_t_2)) {
6773  PyObject* exc_type = PyErr_Occurred();
6774  if (exc_type) {
6775  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6776  else __PYX_ERR(0, 494, __pyx_L1_error)
6777  }
6778  break;
6779  }
6780  __Pyx_GOTREF(__pyx_t_2);
6781  }
6782  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
6783  __pyx_t_2 = 0;
6784 
6785  /* "ADR.pyx":495
6786  * hamiltonian = {}
6787  * for i in range(nc):
6788  * diffusion[i] = {i : {i:'constant'}} # <<<<<<<<<<<<<<
6789  * reaction[i] = {i : 'constant'}
6790  * advection[i] = {i : 'linear'} #now include for gravity type terms
6791  */
6792  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error)
6793  __Pyx_GOTREF(__pyx_t_2);
6794  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 495, __pyx_L1_error)
6795  __Pyx_GOTREF(__pyx_t_5);
6796  if (PyDict_SetItem(__pyx_t_5, __pyx_v_i, __pyx_n_s_constant) < 0) __PYX_ERR(0, 495, __pyx_L1_error)
6797  if (PyDict_SetItem(__pyx_t_2, __pyx_v_i, __pyx_t_5) < 0) __PYX_ERR(0, 495, __pyx_L1_error)
6798  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6799  if (unlikely(PyDict_SetItem(__pyx_v_diffusion, __pyx_v_i, __pyx_t_2) < 0)) __PYX_ERR(0, 495, __pyx_L1_error)
6800  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6801 
6802  /* "ADR.pyx":496
6803  * for i in range(nc):
6804  * diffusion[i] = {i : {i:'constant'}}
6805  * reaction[i] = {i : 'constant'} # <<<<<<<<<<<<<<
6806  * advection[i] = {i : 'linear'} #now include for gravity type terms
6807  * potential[i] = {i : 'u'}
6808  */
6809  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error)
6810  __Pyx_GOTREF(__pyx_t_2);
6811  if (PyDict_SetItem(__pyx_t_2, __pyx_v_i, __pyx_n_s_constant) < 0) __PYX_ERR(0, 496, __pyx_L1_error)
6812  if (unlikely(PyDict_SetItem(__pyx_v_reaction, __pyx_v_i, __pyx_t_2) < 0)) __PYX_ERR(0, 496, __pyx_L1_error)
6813  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6814 
6815  /* "ADR.pyx":497
6816  * diffusion[i] = {i : {i:'constant'}}
6817  * reaction[i] = {i : 'constant'}
6818  * advection[i] = {i : 'linear'} #now include for gravity type terms # <<<<<<<<<<<<<<
6819  * potential[i] = {i : 'u'}
6820  * #end i
6821  */
6822  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error)
6823  __Pyx_GOTREF(__pyx_t_2);
6824  if (PyDict_SetItem(__pyx_t_2, __pyx_v_i, __pyx_n_s_linear) < 0) __PYX_ERR(0, 497, __pyx_L1_error)
6825  if (unlikely(PyDict_SetItem(__pyx_v_advection, __pyx_v_i, __pyx_t_2) < 0)) __PYX_ERR(0, 497, __pyx_L1_error)
6826  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6827 
6828  /* "ADR.pyx":498
6829  * reaction[i] = {i : 'constant'}
6830  * advection[i] = {i : 'linear'} #now include for gravity type terms
6831  * potential[i] = {i : 'u'} # <<<<<<<<<<<<<<
6832  * #end i
6833  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'),
6834  */
6835  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error)
6836  __Pyx_GOTREF(__pyx_t_2);
6837  if (PyDict_SetItem(__pyx_t_2, __pyx_v_i, __pyx_n_s_u) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
6838  if (unlikely(PyDict_SetItem(__pyx_v_potential, __pyx_v_i, __pyx_t_2) < 0)) __PYX_ERR(0, 498, __pyx_L1_error)
6839  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6840 
6841  /* "ADR.pyx":494
6842  * reaction = {}
6843  * hamiltonian = {}
6844  * for i in range(nc): # <<<<<<<<<<<<<<
6845  * diffusion[i] = {i : {i:'constant'}}
6846  * reaction[i] = {i : 'constant'}
6847  */
6848  }
6849  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6850 
6851  /* "ADR.pyx":500
6852  * potential[i] = {i : 'u'}
6853  * #end i
6854  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'), # <<<<<<<<<<<<<<
6855  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
6856  * TC_base.__init__(self,
6857  */
6858  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
6859  __Pyx_GOTREF(__pyx_t_1);
6860  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
6861  __Pyx_GOTREF(__pyx_t_2);
6862  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_arange); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 500, __pyx_L1_error)
6863  __Pyx_GOTREF(__pyx_t_5);
6864  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6865  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
6866  __Pyx_GOTREF(__pyx_t_2);
6867  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_start, __pyx_int_0) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
6868  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
6869  __Pyx_GOTREF(__pyx_t_6);
6870  __pyx_t_7 = PyNumber_Power(__pyx_t_6, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 500, __pyx_L1_error)
6871  __Pyx_GOTREF(__pyx_t_7);
6872  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6873  __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_7, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
6874  __Pyx_GOTREF(__pyx_t_6);
6875  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6876  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_stop, __pyx_t_6) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
6877  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6878  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
6879  __Pyx_GOTREF(__pyx_t_6);
6880  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_step, __pyx_t_6) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
6881  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6882  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_i) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
6883  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
6884  __Pyx_GOTREF(__pyx_t_6);
6885  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6886  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6887 
6888  /* "ADR.pyx":501
6889  * #end i
6890  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'),
6891  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))} # <<<<<<<<<<<<<<
6892  * TC_base.__init__(self,
6893  * nc,
6894  */
6895  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
6896  __Pyx_GOTREF(__pyx_t_2);
6897  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error)
6898  __Pyx_GOTREF(__pyx_t_5);
6899  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6900  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
6901  __Pyx_GOTREF(__pyx_t_2);
6902  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6903  __Pyx_GOTREF(__pyx_t_7);
6904  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 501, __pyx_L1_error)
6905  __Pyx_GOTREF(__pyx_t_8);
6906  __Pyx_GIVEREF(__pyx_t_7);
6907  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
6908  __pyx_t_7 = 0;
6909  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6910  __Pyx_GOTREF(__pyx_t_7);
6911  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6912  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
6913  __pyx_t_8 = __pyx_t_7; __Pyx_INCREF(__pyx_t_8); __pyx_t_3 = 0;
6914  __pyx_t_4 = NULL;
6915  } else {
6916  __pyx_t_3 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 501, __pyx_L1_error)
6917  __Pyx_GOTREF(__pyx_t_8);
6918  __pyx_t_4 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
6919  }
6920  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6921  for (;;) {
6922  if (likely(!__pyx_t_4)) {
6923  if (likely(PyList_CheckExact(__pyx_t_8))) {
6924  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_8)) break;
6925  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6926  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
6927  #else
6928  __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6929  __Pyx_GOTREF(__pyx_t_7);
6930  #endif
6931  } else {
6932  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
6933  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6934  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
6935  #else
6936  __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6937  __Pyx_GOTREF(__pyx_t_7);
6938  #endif
6939  }
6940  } else {
6941  __pyx_t_7 = __pyx_t_4(__pyx_t_8);
6942  if (unlikely(!__pyx_t_7)) {
6943  PyObject* exc_type = PyErr_Occurred();
6944  if (exc_type) {
6945  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6946  else __PYX_ERR(0, 501, __pyx_L1_error)
6947  }
6948  break;
6949  }
6950  __Pyx_GOTREF(__pyx_t_7);
6951  }
6952  __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_7);
6953  __pyx_t_7 = 0;
6954  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6955  __Pyx_GOTREF(__pyx_t_7);
6956  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 501, __pyx_L1_error)
6957  __Pyx_GOTREF(__pyx_t_9);
6958  __Pyx_GIVEREF(__pyx_t_7);
6959  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
6960  __pyx_t_7 = 0;
6961  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6962  __Pyx_GOTREF(__pyx_t_7);
6963  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6964  if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 501, __pyx_L1_error)
6965  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6966  }
6967  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6968  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 501, __pyx_L1_error)
6969  __Pyx_GOTREF(__pyx_t_8);
6970  __Pyx_GIVEREF(__pyx_t_2);
6971  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
6972  __pyx_t_2 = 0;
6973  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
6974  __Pyx_GOTREF(__pyx_t_2);
6975  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_i) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
6976  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6977  __Pyx_GOTREF(__pyx_t_7);
6978  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6979  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6980  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6981 
6982  /* "ADR.pyx":500
6983  * potential[i] = {i : 'u'}
6984  * #end i
6985  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'), # <<<<<<<<<<<<<<
6986  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
6987  * TC_base.__init__(self,
6988  */
6989  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
6990  __Pyx_GOTREF(__pyx_t_2);
6991  __Pyx_GIVEREF(__pyx_t_6);
6992  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
6993  __Pyx_GIVEREF(__pyx_t_7);
6994  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
6995  __pyx_t_6 = 0;
6996  __pyx_t_7 = 0;
6997  if (PyDict_SetItem(__pyx_t_1, __pyx_tuple__4, __pyx_t_2) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
6998  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6999  __pyx_v_sdInfo = ((PyObject*)__pyx_t_1);
7000  __pyx_t_1 = 0;
7001 
7002  /* "ADR.pyx":502
7003  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'),
7004  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
7005  * TC_base.__init__(self, # <<<<<<<<<<<<<<
7006  * nc,
7007  * mass,
7008  */
7009  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TC_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
7010  __Pyx_GOTREF(__pyx_t_1);
7011  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error)
7012  __Pyx_GOTREF(__pyx_t_2);
7013  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7014 
7015  /* "ADR.pyx":509
7016  * potential,
7017  * reaction,
7018  * hamiltonian, # <<<<<<<<<<<<<<
7019  * variableNames=['u'],
7020  * sparseDiffusionTensors=sdInfo,
7021  */
7022  __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
7023  __Pyx_GOTREF(__pyx_t_1);
7024  __Pyx_INCREF(__pyx_v_self);
7025  __Pyx_GIVEREF(__pyx_v_self);
7026  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
7027  __Pyx_INCREF(__pyx_v_nc);
7028  __Pyx_GIVEREF(__pyx_v_nc);
7029  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_nc);
7030  __Pyx_INCREF(__pyx_v_mass);
7031  __Pyx_GIVEREF(__pyx_v_mass);
7032  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_mass);
7033  __Pyx_INCREF(__pyx_v_advection);
7034  __Pyx_GIVEREF(__pyx_v_advection);
7035  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_advection);
7036  __Pyx_INCREF(__pyx_v_diffusion);
7037  __Pyx_GIVEREF(__pyx_v_diffusion);
7038  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_diffusion);
7039  __Pyx_INCREF(__pyx_v_potential);
7040  __Pyx_GIVEREF(__pyx_v_potential);
7041  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_potential);
7042  __Pyx_INCREF(__pyx_v_reaction);
7043  __Pyx_GIVEREF(__pyx_v_reaction);
7044  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_reaction);
7045  __Pyx_INCREF(__pyx_v_hamiltonian);
7046  __Pyx_GIVEREF(__pyx_v_hamiltonian);
7047  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_hamiltonian);
7048 
7049  /* "ADR.pyx":510
7050  * reaction,
7051  * hamiltonian,
7052  * variableNames=['u'], # <<<<<<<<<<<<<<
7053  * sparseDiffusionTensors=sdInfo,
7054  * useSparseDiffusion=True,
7055  */
7056  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 510, __pyx_L1_error)
7057  __Pyx_GOTREF(__pyx_t_7);
7058  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 510, __pyx_L1_error)
7059  __Pyx_GOTREF(__pyx_t_6);
7060  __Pyx_INCREF(__pyx_n_s_u);
7061  __Pyx_GIVEREF(__pyx_n_s_u);
7062  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_u);
7063  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_variableNames, __pyx_t_6) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
7064  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7065 
7066  /* "ADR.pyx":511
7067  * hamiltonian,
7068  * variableNames=['u'],
7069  * sparseDiffusionTensors=sdInfo, # <<<<<<<<<<<<<<
7070  * useSparseDiffusion=True,
7071  * movingDomain=False)
7072  */
7073  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_sparseDiffusionTensors, __pyx_v_sdInfo) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
7074 
7075  /* "ADR.pyx":512
7076  * variableNames=['u'],
7077  * sparseDiffusionTensors=sdInfo,
7078  * useSparseDiffusion=True, # <<<<<<<<<<<<<<
7079  * movingDomain=False)
7080  * def initializeElementQuadrature(self,t,cq):
7081  */
7082  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_useSparseDiffusion, Py_True) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
7083 
7084  /* "ADR.pyx":513
7085  * sparseDiffusionTensors=sdInfo,
7086  * useSparseDiffusion=True,
7087  * movingDomain=False) # <<<<<<<<<<<<<<
7088  * def initializeElementQuadrature(self,t,cq):
7089  * nd = self.nd
7090  */
7091  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_movingDomain, Py_False) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
7092 
7093  /* "ADR.pyx":502
7094  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'),
7095  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
7096  * TC_base.__init__(self, # <<<<<<<<<<<<<<
7097  * nc,
7098  * mass,
7099  */
7100  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 502, __pyx_L1_error)
7101  __Pyx_GOTREF(__pyx_t_6);
7102  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7103  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7104  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7105  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7106 
7107  /* "ADR.pyx":472
7108  * """
7109  * from proteus.ctransportCoefficients import L2projectEvaluate
7110  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
7111  * timeVaryingCoefficients=False,
7112  * forceStrongDirichlet=False,
7113  */
7114 
7115  /* function exit code */
7116  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7117  goto __pyx_L0;
7118  __pyx_L1_error:;
7119  __Pyx_XDECREF(__pyx_t_1);
7120  __Pyx_XDECREF(__pyx_t_2);
7121  __Pyx_XDECREF(__pyx_t_5);
7122  __Pyx_XDECREF(__pyx_t_6);
7123  __Pyx_XDECREF(__pyx_t_7);
7124  __Pyx_XDECREF(__pyx_t_8);
7125  __Pyx_XDECREF(__pyx_t_9);
7126  __Pyx_AddTraceback("ADR.Coefficients.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7127  __pyx_r = NULL;
7128  __pyx_L0:;
7129  __Pyx_XDECREF(__pyx_v_mass);
7130  __Pyx_XDECREF(__pyx_v_advection);
7131  __Pyx_XDECREF(__pyx_v_diffusion);
7132  __Pyx_XDECREF(__pyx_v_potential);
7133  __Pyx_XDECREF(__pyx_v_reaction);
7134  __Pyx_XDECREF(__pyx_v_hamiltonian);
7135  __Pyx_XDECREF(__pyx_v_i);
7136  __Pyx_XDECREF(__pyx_v_sdInfo);
7137  __Pyx_XDECREF(__pyx_v_row);
7138  __Pyx_XGIVEREF(__pyx_r);
7139  __Pyx_RefNannyFinishContext();
7140  return __pyx_r;
7141 }
7142 
7143 /* "ADR.pyx":514
7144  * useSparseDiffusion=True,
7145  * movingDomain=False)
7146  * def initializeElementQuadrature(self,t,cq): # <<<<<<<<<<<<<<
7147  * nd = self.nd
7148  * for ci in range(self.nc):
7149  */
7150 
7151 /* Python wrapper */
7152 static PyObject *__pyx_pw_3ADR_12Coefficients_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7153 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_3initializeElementQuadrature = {"initializeElementQuadrature", (PyCFunction)__pyx_pw_3ADR_12Coefficients_3initializeElementQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
7154 static PyObject *__pyx_pw_3ADR_12Coefficients_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7155  PyObject *__pyx_v_self = 0;
7156  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
7157  PyObject *__pyx_v_cq = 0;
7158  PyObject *__pyx_r = 0;
7159  __Pyx_RefNannyDeclarations
7160  __Pyx_RefNannySetupContext("initializeElementQuadrature (wrapper)", 0);
7161  {
7162  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,&__pyx_n_s_cq,0};
7163  PyObject* values[3] = {0,0,0};
7164  if (unlikely(__pyx_kwds)) {
7165  Py_ssize_t kw_args;
7166  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7167  switch (pos_args) {
7168  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7169  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7170  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7171  case 0: break;
7172  default: goto __pyx_L5_argtuple_error;
7173  }
7174  kw_args = PyDict_Size(__pyx_kwds);
7175  switch (pos_args) {
7176  case 0:
7177  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
7178  else goto __pyx_L5_argtuple_error;
7179  case 1:
7180  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
7181  else {
7182  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 3, 3, 1); __PYX_ERR(0, 514, __pyx_L3_error)
7183  }
7184  case 2:
7185  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cq)) != 0)) kw_args--;
7186  else {
7187  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 3, 3, 2); __PYX_ERR(0, 514, __pyx_L3_error)
7188  }
7189  }
7190  if (unlikely(kw_args > 0)) {
7191  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeElementQuadrature") < 0)) __PYX_ERR(0, 514, __pyx_L3_error)
7192  }
7193  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
7194  goto __pyx_L5_argtuple_error;
7195  } else {
7196  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7197  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7198  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7199  }
7200  __pyx_v_self = values[0];
7201  __pyx_v_t = values[1];
7202  __pyx_v_cq = values[2];
7203  }
7204  goto __pyx_L4_argument_unpacking_done;
7205  __pyx_L5_argtuple_error:;
7206  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 514, __pyx_L3_error)
7207  __pyx_L3_error:;
7208  __Pyx_AddTraceback("ADR.Coefficients.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
7209  __Pyx_RefNannyFinishContext();
7210  return NULL;
7211  __pyx_L4_argument_unpacking_done:;
7212  __pyx_r = __pyx_pf_3ADR_12Coefficients_2initializeElementQuadrature(__pyx_self, __pyx_v_self, __pyx_v_t, __pyx_v_cq);
7213 
7214  /* function exit code */
7215  __Pyx_RefNannyFinishContext();
7216  return __pyx_r;
7217 }
7218 
7219 static PyObject *__pyx_pf_3ADR_12Coefficients_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cq) {
7220  PyObject *__pyx_v_nd = NULL;
7221  PyObject *__pyx_v_ci = NULL;
7222  PyObject *__pyx_v_i = NULL;
7223  PyObject *__pyx_r = NULL;
7224  __Pyx_RefNannyDeclarations
7225  PyObject *__pyx_t_1 = NULL;
7226  PyObject *__pyx_t_2 = NULL;
7227  Py_ssize_t __pyx_t_3;
7228  PyObject *(*__pyx_t_4)(PyObject *);
7229  PyObject *__pyx_t_5 = NULL;
7230  PyObject *__pyx_t_6 = NULL;
7231  PyObject *__pyx_t_7 = NULL;
7232  PyObject *__pyx_t_8 = NULL;
7233  int __pyx_t_9;
7234  int __pyx_t_10;
7235  Py_ssize_t __pyx_t_11;
7236  PyObject *(*__pyx_t_12)(PyObject *);
7237  PyObject *__pyx_t_13 = NULL;
7238  PyObject *__pyx_t_14 = NULL;
7239  __Pyx_RefNannySetupContext("initializeElementQuadrature", 0);
7240 
7241  /* "ADR.pyx":515
7242  * movingDomain=False)
7243  * def initializeElementQuadrature(self,t,cq):
7244  * nd = self.nd # <<<<<<<<<<<<<<
7245  * for ci in range(self.nc):
7246  * if cq.has_key(('df',ci,ci)):
7247  */
7248  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
7249  __Pyx_GOTREF(__pyx_t_1);
7250  __pyx_v_nd = __pyx_t_1;
7251  __pyx_t_1 = 0;
7252 
7253  /* "ADR.pyx":516
7254  * def initializeElementQuadrature(self,t,cq):
7255  * nd = self.nd
7256  * for ci in range(self.nc): # <<<<<<<<<<<<<<
7257  * if cq.has_key(('df',ci,ci)):
7258  * if self.velocity is not None:
7259  */
7260  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
7261  __Pyx_GOTREF(__pyx_t_1);
7262  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
7263  __Pyx_GOTREF(__pyx_t_2);
7264  __Pyx_GIVEREF(__pyx_t_1);
7265  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7266  __pyx_t_1 = 0;
7267  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
7268  __Pyx_GOTREF(__pyx_t_1);
7269  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7270  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
7271  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
7272  __pyx_t_4 = NULL;
7273  } else {
7274  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
7275  __Pyx_GOTREF(__pyx_t_2);
7276  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error)
7277  }
7278  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7279  for (;;) {
7280  if (likely(!__pyx_t_4)) {
7281  if (likely(PyList_CheckExact(__pyx_t_2))) {
7282  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
7283  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7284  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 516, __pyx_L1_error)
7285  #else
7286  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
7287  __Pyx_GOTREF(__pyx_t_1);
7288  #endif
7289  } else {
7290  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
7291  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7292  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 516, __pyx_L1_error)
7293  #else
7294  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
7295  __Pyx_GOTREF(__pyx_t_1);
7296  #endif
7297  }
7298  } else {
7299  __pyx_t_1 = __pyx_t_4(__pyx_t_2);
7300  if (unlikely(!__pyx_t_1)) {
7301  PyObject* exc_type = PyErr_Occurred();
7302  if (exc_type) {
7303  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7304  else __PYX_ERR(0, 516, __pyx_L1_error)
7305  }
7306  break;
7307  }
7308  __Pyx_GOTREF(__pyx_t_1);
7309  }
7310  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
7311  __pyx_t_1 = 0;
7312 
7313  /* "ADR.pyx":517
7314  * nd = self.nd
7315  * for ci in range(self.nc):
7316  * if cq.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
7317  * if self.velocity is not None:
7318  * cq[('df',ci,ci)][...,:] = self.velocity
7319  */
7320  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cq, __pyx_n_s_has_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 517, __pyx_L1_error)
7321  __Pyx_GOTREF(__pyx_t_5);
7322  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 517, __pyx_L1_error)
7323  __Pyx_GOTREF(__pyx_t_6);
7324  __Pyx_INCREF(__pyx_n_s_df);
7325  __Pyx_GIVEREF(__pyx_n_s_df);
7326  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_df);
7327  __Pyx_INCREF(__pyx_v_ci);
7328  __Pyx_GIVEREF(__pyx_v_ci);
7329  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
7330  __Pyx_INCREF(__pyx_v_ci);
7331  __Pyx_GIVEREF(__pyx_v_ci);
7332  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ci);
7333  __pyx_t_7 = NULL;
7334  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
7335  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
7336  if (likely(__pyx_t_7)) {
7337  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7338  __Pyx_INCREF(__pyx_t_7);
7339  __Pyx_INCREF(function);
7340  __Pyx_DECREF_SET(__pyx_t_5, function);
7341  }
7342  }
7343  if (!__pyx_t_7) {
7344  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
7345  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7346  __Pyx_GOTREF(__pyx_t_1);
7347  } else {
7348  #if CYTHON_FAST_PYCALL
7349  if (PyFunction_Check(__pyx_t_5)) {
7350  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
7351  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
7352  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7353  __Pyx_GOTREF(__pyx_t_1);
7354  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7355  } else
7356  #endif
7357  #if CYTHON_FAST_PYCCALL
7358  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
7359  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
7360  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
7361  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7362  __Pyx_GOTREF(__pyx_t_1);
7363  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7364  } else
7365  #endif
7366  {
7367  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 517, __pyx_L1_error)
7368  __Pyx_GOTREF(__pyx_t_8);
7369  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
7370  __Pyx_GIVEREF(__pyx_t_6);
7371  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
7372  __pyx_t_6 = 0;
7373  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
7374  __Pyx_GOTREF(__pyx_t_1);
7375  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7376  }
7377  }
7378  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7379  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 517, __pyx_L1_error)
7380  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7381  if (__pyx_t_9) {
7382 
7383  /* "ADR.pyx":518
7384  * for ci in range(self.nc):
7385  * if cq.has_key(('df',ci,ci)):
7386  * if self.velocity is not None: # <<<<<<<<<<<<<<
7387  * cq[('df',ci,ci)][...,:] = self.velocity
7388  * else:
7389  */
7390  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
7391  __Pyx_GOTREF(__pyx_t_1);
7392  __pyx_t_9 = (__pyx_t_1 != Py_None);
7393  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7394  __pyx_t_10 = (__pyx_t_9 != 0);
7395  if (__pyx_t_10) {
7396 
7397  /* "ADR.pyx":519
7398  * if cq.has_key(('df',ci,ci)):
7399  * if self.velocity is not None:
7400  * cq[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
7401  * else:
7402  * cq[('df',ci,ci)].flat[:] = 0.0
7403  */
7404  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error)
7405  __Pyx_GOTREF(__pyx_t_1);
7406  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 519, __pyx_L1_error)
7407  __Pyx_GOTREF(__pyx_t_5);
7408  __Pyx_INCREF(__pyx_n_s_df);
7409  __Pyx_GIVEREF(__pyx_n_s_df);
7410  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_df);
7411  __Pyx_INCREF(__pyx_v_ci);
7412  __Pyx_GIVEREF(__pyx_v_ci);
7413  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ci);
7414  __Pyx_INCREF(__pyx_v_ci);
7415  __Pyx_GIVEREF(__pyx_v_ci);
7416  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_ci);
7417  __pyx_t_8 = PyObject_GetItem(__pyx_v_cq, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 519, __pyx_L1_error)
7418  __Pyx_GOTREF(__pyx_t_8);
7419  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7420  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_tuple__6, __pyx_t_1) < 0)) __PYX_ERR(0, 519, __pyx_L1_error)
7421  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7422  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7423 
7424  /* "ADR.pyx":518
7425  * for ci in range(self.nc):
7426  * if cq.has_key(('df',ci,ci)):
7427  * if self.velocity is not None: # <<<<<<<<<<<<<<
7428  * cq[('df',ci,ci)][...,:] = self.velocity
7429  * else:
7430  */
7431  goto __pyx_L6;
7432  }
7433 
7434  /* "ADR.pyx":521
7435  * cq[('df',ci,ci)][...,:] = self.velocity
7436  * else:
7437  * cq[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
7438  * for i in range(len(cq[('r',ci)].flat)):
7439  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
7440  */
7441  /*else*/ {
7442  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
7443  __Pyx_GOTREF(__pyx_t_1);
7444  __Pyx_INCREF(__pyx_n_s_df);
7445  __Pyx_GIVEREF(__pyx_n_s_df);
7446  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_df);
7447  __Pyx_INCREF(__pyx_v_ci);
7448  __Pyx_GIVEREF(__pyx_v_ci);
7449  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
7450  __Pyx_INCREF(__pyx_v_ci);
7451  __Pyx_GIVEREF(__pyx_v_ci);
7452  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_ci);
7453  __pyx_t_8 = PyObject_GetItem(__pyx_v_cq, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 521, __pyx_L1_error)
7454  __Pyx_GOTREF(__pyx_t_8);
7455  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7456  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
7457  __Pyx_GOTREF(__pyx_t_1);
7458  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7459  if (__Pyx_PyObject_SetSlice(__pyx_t_1, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__7, 0, 0, 1) < 0) __PYX_ERR(0, 521, __pyx_L1_error)
7460  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7461  }
7462  __pyx_L6:;
7463 
7464  /* "ADR.pyx":517
7465  * nd = self.nd
7466  * for ci in range(self.nc):
7467  * if cq.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
7468  * if self.velocity is not None:
7469  * cq[('df',ci,ci)][...,:] = self.velocity
7470  */
7471  }
7472 
7473  /* "ADR.pyx":522
7474  * else:
7475  * cq[('df',ci,ci)].flat[:] = 0.0
7476  * for i in range(len(cq[('r',ci)].flat)): # <<<<<<<<<<<<<<
7477  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
7478  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
7479  */
7480  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
7481  __Pyx_GOTREF(__pyx_t_1);
7482  __Pyx_INCREF(__pyx_n_s_r);
7483  __Pyx_GIVEREF(__pyx_n_s_r);
7484  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_r);
7485  __Pyx_INCREF(__pyx_v_ci);
7486  __Pyx_GIVEREF(__pyx_v_ci);
7487  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
7488  __pyx_t_8 = PyObject_GetItem(__pyx_v_cq, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 522, __pyx_L1_error)
7489  __Pyx_GOTREF(__pyx_t_8);
7490  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7491  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
7492  __Pyx_GOTREF(__pyx_t_1);
7493  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7494  __pyx_t_11 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 522, __pyx_L1_error)
7495  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7496  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
7497  __Pyx_GOTREF(__pyx_t_1);
7498  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 522, __pyx_L1_error)
7499  __Pyx_GOTREF(__pyx_t_8);
7500  __Pyx_GIVEREF(__pyx_t_1);
7501  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
7502  __pyx_t_1 = 0;
7503  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
7504  __Pyx_GOTREF(__pyx_t_1);
7505  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7506  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
7507  __pyx_t_8 = __pyx_t_1; __Pyx_INCREF(__pyx_t_8); __pyx_t_11 = 0;
7508  __pyx_t_12 = NULL;
7509  } else {
7510  __pyx_t_11 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 522, __pyx_L1_error)
7511  __Pyx_GOTREF(__pyx_t_8);
7512  __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 522, __pyx_L1_error)
7513  }
7514  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7515  for (;;) {
7516  if (likely(!__pyx_t_12)) {
7517  if (likely(PyList_CheckExact(__pyx_t_8))) {
7518  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_8)) break;
7519  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7520  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 522, __pyx_L1_error)
7521  #else
7522  __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
7523  __Pyx_GOTREF(__pyx_t_1);
7524  #endif
7525  } else {
7526  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
7527  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7528  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 522, __pyx_L1_error)
7529  #else
7530  __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
7531  __Pyx_GOTREF(__pyx_t_1);
7532  #endif
7533  }
7534  } else {
7535  __pyx_t_1 = __pyx_t_12(__pyx_t_8);
7536  if (unlikely(!__pyx_t_1)) {
7537  PyObject* exc_type = PyErr_Occurred();
7538  if (exc_type) {
7539  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7540  else __PYX_ERR(0, 522, __pyx_L1_error)
7541  }
7542  break;
7543  }
7544  __Pyx_GOTREF(__pyx_t_1);
7545  }
7546  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
7547  __pyx_t_1 = 0;
7548 
7549  /* "ADR.pyx":523
7550  * cq[('df',ci,ci)].flat[:] = 0.0
7551  * for i in range(len(cq[('r',ci)].flat)):
7552  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)]) # <<<<<<<<<<<<<<
7553  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
7554  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
7555  */
7556  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fOfX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
7557  __Pyx_GOTREF(__pyx_t_5);
7558  __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_ci); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 523, __pyx_L1_error)
7559  __Pyx_GOTREF(__pyx_t_6);
7560  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7561  __pyx_t_5 = PyObject_GetItem(__pyx_v_cq, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
7562  __Pyx_GOTREF(__pyx_t_5);
7563  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_flat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 523, __pyx_L1_error)
7564  __Pyx_GOTREF(__pyx_t_7);
7565  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7566  __pyx_t_5 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
7567  __Pyx_GOTREF(__pyx_t_5);
7568  __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 523, __pyx_L1_error)
7569  __Pyx_GOTREF(__pyx_t_13);
7570  __pyx_t_14 = PyNumber_Multiply(__pyx_int_3, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 523, __pyx_L1_error)
7571  __Pyx_GOTREF(__pyx_t_14);
7572  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7573  __pyx_t_13 = __Pyx_PyObject_GetSlice(__pyx_t_7, 0, 0, &__pyx_t_5, &__pyx_t_14, NULL, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 523, __pyx_L1_error)
7574  __Pyx_GOTREF(__pyx_t_13);
7575  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7576  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7577  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
7578  __pyx_t_14 = NULL;
7579  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
7580  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_6);
7581  if (likely(__pyx_t_14)) {
7582  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7583  __Pyx_INCREF(__pyx_t_14);
7584  __Pyx_INCREF(function);
7585  __Pyx_DECREF_SET(__pyx_t_6, function);
7586  }
7587  }
7588  if (!__pyx_t_14) {
7589  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
7590  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7591  __Pyx_GOTREF(__pyx_t_1);
7592  } else {
7593  #if CYTHON_FAST_PYCALL
7594  if (PyFunction_Check(__pyx_t_6)) {
7595  PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_13};
7596  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
7597  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
7598  __Pyx_GOTREF(__pyx_t_1);
7599  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7600  } else
7601  #endif
7602  #if CYTHON_FAST_PYCCALL
7603  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
7604  PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_13};
7605  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
7606  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
7607  __Pyx_GOTREF(__pyx_t_1);
7608  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7609  } else
7610  #endif
7611  {
7612  __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
7613  __Pyx_GOTREF(__pyx_t_5);
7614  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_14); __pyx_t_14 = NULL;
7615  __Pyx_GIVEREF(__pyx_t_13);
7616  PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_13);
7617  __pyx_t_13 = 0;
7618  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
7619  __Pyx_GOTREF(__pyx_t_1);
7620  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7621  }
7622  }
7623  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7624  __pyx_t_6 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 523, __pyx_L1_error)
7625  __Pyx_GOTREF(__pyx_t_6);
7626  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7627  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
7628  __Pyx_GOTREF(__pyx_t_1);
7629  __Pyx_INCREF(__pyx_n_s_r);
7630  __Pyx_GIVEREF(__pyx_n_s_r);
7631  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_r);
7632  __Pyx_INCREF(__pyx_v_ci);
7633  __Pyx_GIVEREF(__pyx_v_ci);
7634  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
7635  __pyx_t_5 = PyObject_GetItem(__pyx_v_cq, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
7636  __Pyx_GOTREF(__pyx_t_5);
7637  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7638  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
7639  __Pyx_GOTREF(__pyx_t_1);
7640  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7641  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_i, __pyx_t_6) < 0)) __PYX_ERR(0, 523, __pyx_L1_error)
7642  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7643  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7644 
7645  /* "ADR.pyx":524
7646  * for i in range(len(cq[('r',ci)].flat)):
7647  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
7648  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat # <<<<<<<<<<<<<<
7649  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
7650  * nd = self.nd
7651  */
7652  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aOfX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
7653  __Pyx_GOTREF(__pyx_t_1);
7654  __pyx_t_5 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
7655  __Pyx_GOTREF(__pyx_t_5);
7656  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7657  __pyx_t_1 = PyObject_GetItem(__pyx_v_cq, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
7658  __Pyx_GOTREF(__pyx_t_1);
7659  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 524, __pyx_L1_error)
7660  __Pyx_GOTREF(__pyx_t_13);
7661  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7662  __pyx_t_1 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
7663  __Pyx_GOTREF(__pyx_t_1);
7664  __pyx_t_14 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 524, __pyx_L1_error)
7665  __Pyx_GOTREF(__pyx_t_14);
7666  __pyx_t_7 = PyNumber_Multiply(__pyx_int_3, __pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 524, __pyx_L1_error)
7667  __Pyx_GOTREF(__pyx_t_7);
7668  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
7669  __pyx_t_14 = __Pyx_PyObject_GetSlice(__pyx_t_13, 0, 0, &__pyx_t_1, &__pyx_t_7, NULL, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 524, __pyx_L1_error)
7670  __Pyx_GOTREF(__pyx_t_14);
7671  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7672  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7673  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7674  __pyx_t_7 = NULL;
7675  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
7676  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
7677  if (likely(__pyx_t_7)) {
7678  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7679  __Pyx_INCREF(__pyx_t_7);
7680  __Pyx_INCREF(function);
7681  __Pyx_DECREF_SET(__pyx_t_5, function);
7682  }
7683  }
7684  if (!__pyx_t_7) {
7685  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __pyx_L1_error)
7686  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
7687  __Pyx_GOTREF(__pyx_t_6);
7688  } else {
7689  #if CYTHON_FAST_PYCALL
7690  if (PyFunction_Check(__pyx_t_5)) {
7691  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_14};
7692  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __pyx_L1_error)
7693  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7694  __Pyx_GOTREF(__pyx_t_6);
7695  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
7696  } else
7697  #endif
7698  #if CYTHON_FAST_PYCCALL
7699  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
7700  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_14};
7701  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __pyx_L1_error)
7702  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7703  __Pyx_GOTREF(__pyx_t_6);
7704  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
7705  } else
7706  #endif
7707  {
7708  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
7709  __Pyx_GOTREF(__pyx_t_1);
7710  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
7711  __Pyx_GIVEREF(__pyx_t_14);
7712  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_14);
7713  __pyx_t_14 = 0;
7714  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __pyx_L1_error)
7715  __Pyx_GOTREF(__pyx_t_6);
7716  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7717  }
7718  }
7719  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7720  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_flat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
7721  __Pyx_GOTREF(__pyx_t_5);
7722  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7723  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __pyx_L1_error)
7724  __Pyx_GOTREF(__pyx_t_6);
7725  __Pyx_INCREF(__pyx_n_s_a);
7726  __Pyx_GIVEREF(__pyx_n_s_a);
7727  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_a);
7728  __Pyx_INCREF(__pyx_v_ci);
7729  __Pyx_GIVEREF(__pyx_v_ci);
7730  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
7731  __Pyx_INCREF(__pyx_v_ci);
7732  __Pyx_GIVEREF(__pyx_v_ci);
7733  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ci);
7734  __pyx_t_1 = PyObject_GetItem(__pyx_v_cq, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
7735  __Pyx_GOTREF(__pyx_t_1);
7736  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7737  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __pyx_L1_error)
7738  __Pyx_GOTREF(__pyx_t_6);
7739  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7740  __pyx_t_1 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
7741  __Pyx_GOTREF(__pyx_t_1);
7742  __pyx_t_14 = PyNumber_Multiply(__pyx_t_1, __pyx_v_i); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 524, __pyx_L1_error)
7743  __Pyx_GOTREF(__pyx_t_14);
7744  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7745  __pyx_t_1 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
7746  __Pyx_GOTREF(__pyx_t_1);
7747  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 524, __pyx_L1_error)
7748  __Pyx_GOTREF(__pyx_t_7);
7749  __pyx_t_13 = PyNumber_Multiply(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 524, __pyx_L1_error)
7750  __Pyx_GOTREF(__pyx_t_13);
7751  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7752  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7753  if (__Pyx_PyObject_SetSlice(__pyx_t_6, __pyx_t_5, 0, 0, &__pyx_t_14, &__pyx_t_13, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 524, __pyx_L1_error)
7754  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7755  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
7756  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7757  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7758 
7759  /* "ADR.pyx":522
7760  * else:
7761  * cq[('df',ci,ci)].flat[:] = 0.0
7762  * for i in range(len(cq[('r',ci)].flat)): # <<<<<<<<<<<<<<
7763  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
7764  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
7765  */
7766  }
7767  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7768 
7769  /* "ADR.pyx":516
7770  * def initializeElementQuadrature(self,t,cq):
7771  * nd = self.nd
7772  * for ci in range(self.nc): # <<<<<<<<<<<<<<
7773  * if cq.has_key(('df',ci,ci)):
7774  * if self.velocity is not None:
7775  */
7776  }
7777  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7778 
7779  /* "ADR.pyx":514
7780  * useSparseDiffusion=True,
7781  * movingDomain=False)
7782  * def initializeElementQuadrature(self,t,cq): # <<<<<<<<<<<<<<
7783  * nd = self.nd
7784  * for ci in range(self.nc):
7785  */
7786 
7787  /* function exit code */
7788  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7789  goto __pyx_L0;
7790  __pyx_L1_error:;
7791  __Pyx_XDECREF(__pyx_t_1);
7792  __Pyx_XDECREF(__pyx_t_2);
7793  __Pyx_XDECREF(__pyx_t_5);
7794  __Pyx_XDECREF(__pyx_t_6);
7795  __Pyx_XDECREF(__pyx_t_7);
7796  __Pyx_XDECREF(__pyx_t_8);
7797  __Pyx_XDECREF(__pyx_t_13);
7798  __Pyx_XDECREF(__pyx_t_14);
7799  __Pyx_AddTraceback("ADR.Coefficients.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
7800  __pyx_r = NULL;
7801  __pyx_L0:;
7802  __Pyx_XDECREF(__pyx_v_nd);
7803  __Pyx_XDECREF(__pyx_v_ci);
7804  __Pyx_XDECREF(__pyx_v_i);
7805  __Pyx_XGIVEREF(__pyx_r);
7806  __Pyx_RefNannyFinishContext();
7807  return __pyx_r;
7808 }
7809 
7810 /* "ADR.pyx":525
7811  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
7812  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
7813  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global): # <<<<<<<<<<<<<<
7814  * nd = self.nd
7815  * for c in [cebq,cebq_global]:
7816  */
7817 
7818 /* Python wrapper */
7819 static PyObject *__pyx_pw_3ADR_12Coefficients_5initializeElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7820 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_5initializeElementBoundaryQuadrature = {"initializeElementBoundaryQuadrature", (PyCFunction)__pyx_pw_3ADR_12Coefficients_5initializeElementBoundaryQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
7821 static PyObject *__pyx_pw_3ADR_12Coefficients_5initializeElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7822  PyObject *__pyx_v_self = 0;
7823  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
7824  PyObject *__pyx_v_cebq = 0;
7825  PyObject *__pyx_v_cebq_global = 0;
7826  PyObject *__pyx_r = 0;
7827  __Pyx_RefNannyDeclarations
7828  __Pyx_RefNannySetupContext("initializeElementBoundaryQuadrature (wrapper)", 0);
7829  {
7830  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,&__pyx_n_s_cebq,&__pyx_n_s_cebq_global,0};
7831  PyObject* values[4] = {0,0,0,0};
7832  if (unlikely(__pyx_kwds)) {
7833  Py_ssize_t kw_args;
7834  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7835  switch (pos_args) {
7836  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7837  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7838  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7839  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7840  case 0: break;
7841  default: goto __pyx_L5_argtuple_error;
7842  }
7843  kw_args = PyDict_Size(__pyx_kwds);
7844  switch (pos_args) {
7845  case 0:
7846  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
7847  else goto __pyx_L5_argtuple_error;
7848  case 1:
7849  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
7850  else {
7851  __Pyx_RaiseArgtupleInvalid("initializeElementBoundaryQuadrature", 1, 4, 4, 1); __PYX_ERR(0, 525, __pyx_L3_error)
7852  }
7853  case 2:
7854  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cebq)) != 0)) kw_args--;
7855  else {
7856  __Pyx_RaiseArgtupleInvalid("initializeElementBoundaryQuadrature", 1, 4, 4, 2); __PYX_ERR(0, 525, __pyx_L3_error)
7857  }
7858  case 3:
7859  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cebq_global)) != 0)) kw_args--;
7860  else {
7861  __Pyx_RaiseArgtupleInvalid("initializeElementBoundaryQuadrature", 1, 4, 4, 3); __PYX_ERR(0, 525, __pyx_L3_error)
7862  }
7863  }
7864  if (unlikely(kw_args > 0)) {
7865  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeElementBoundaryQuadrature") < 0)) __PYX_ERR(0, 525, __pyx_L3_error)
7866  }
7867  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
7868  goto __pyx_L5_argtuple_error;
7869  } else {
7870  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7871  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7872  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7873  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7874  }
7875  __pyx_v_self = values[0];
7876  __pyx_v_t = values[1];
7877  __pyx_v_cebq = values[2];
7878  __pyx_v_cebq_global = values[3];
7879  }
7880  goto __pyx_L4_argument_unpacking_done;
7881  __pyx_L5_argtuple_error:;
7882  __Pyx_RaiseArgtupleInvalid("initializeElementBoundaryQuadrature", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 525, __pyx_L3_error)
7883  __pyx_L3_error:;
7884  __Pyx_AddTraceback("ADR.Coefficients.initializeElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
7885  __Pyx_RefNannyFinishContext();
7886  return NULL;
7887  __pyx_L4_argument_unpacking_done:;
7888  __pyx_r = __pyx_pf_3ADR_12Coefficients_4initializeElementBoundaryQuadrature(__pyx_self, __pyx_v_self, __pyx_v_t, __pyx_v_cebq, __pyx_v_cebq_global);
7889 
7890  /* function exit code */
7891  __Pyx_RefNannyFinishContext();
7892  return __pyx_r;
7893 }
7894 
7895 static PyObject *__pyx_pf_3ADR_12Coefficients_4initializeElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cebq, PyObject *__pyx_v_cebq_global) {
7896  PyObject *__pyx_v_nd = NULL;
7897  PyObject *__pyx_v_c = NULL;
7898  PyObject *__pyx_v_ci = NULL;
7899  PyObject *__pyx_v_i = NULL;
7900  PyObject *__pyx_r = NULL;
7901  __Pyx_RefNannyDeclarations
7902  PyObject *__pyx_t_1 = NULL;
7903  PyObject *__pyx_t_2 = NULL;
7904  Py_ssize_t __pyx_t_3;
7905  PyObject *__pyx_t_4 = NULL;
7906  Py_ssize_t __pyx_t_5;
7907  PyObject *(*__pyx_t_6)(PyObject *);
7908  PyObject *__pyx_t_7 = NULL;
7909  PyObject *__pyx_t_8 = NULL;
7910  PyObject *__pyx_t_9 = NULL;
7911  PyObject *__pyx_t_10 = NULL;
7912  int __pyx_t_11;
7913  int __pyx_t_12;
7914  Py_ssize_t __pyx_t_13;
7915  PyObject *(*__pyx_t_14)(PyObject *);
7916  PyObject *__pyx_t_15 = NULL;
7917  PyObject *__pyx_t_16 = NULL;
7918  __Pyx_RefNannySetupContext("initializeElementBoundaryQuadrature", 0);
7919 
7920  /* "ADR.pyx":526
7921  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
7922  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
7923  * nd = self.nd # <<<<<<<<<<<<<<
7924  * for c in [cebq,cebq_global]:
7925  * for ci in range(self.nc):
7926  */
7927  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
7928  __Pyx_GOTREF(__pyx_t_1);
7929  __pyx_v_nd = __pyx_t_1;
7930  __pyx_t_1 = 0;
7931 
7932  /* "ADR.pyx":527
7933  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
7934  * nd = self.nd
7935  * for c in [cebq,cebq_global]: # <<<<<<<<<<<<<<
7936  * for ci in range(self.nc):
7937  * if c.has_key(('df',ci,ci)):
7938  */
7939  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
7940  __Pyx_GOTREF(__pyx_t_1);
7941  __Pyx_INCREF(__pyx_v_cebq);
7942  __Pyx_GIVEREF(__pyx_v_cebq);
7943  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cebq);
7944  __Pyx_INCREF(__pyx_v_cebq_global);
7945  __Pyx_GIVEREF(__pyx_v_cebq_global);
7946  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_cebq_global);
7947  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
7948  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7949  for (;;) {
7950  if (__pyx_t_3 >= 2) break;
7951  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7952  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 527, __pyx_L1_error)
7953  #else
7954  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
7955  __Pyx_GOTREF(__pyx_t_1);
7956  #endif
7957  __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1);
7958  __pyx_t_1 = 0;
7959 
7960  /* "ADR.pyx":528
7961  * nd = self.nd
7962  * for c in [cebq,cebq_global]:
7963  * for ci in range(self.nc): # <<<<<<<<<<<<<<
7964  * if c.has_key(('df',ci,ci)):
7965  * if self.velocity is not None:
7966  */
7967  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
7968  __Pyx_GOTREF(__pyx_t_1);
7969  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 528, __pyx_L1_error)
7970  __Pyx_GOTREF(__pyx_t_4);
7971  __Pyx_GIVEREF(__pyx_t_1);
7972  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
7973  __pyx_t_1 = 0;
7974  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
7975  __Pyx_GOTREF(__pyx_t_1);
7976  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7977  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
7978  __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
7979  __pyx_t_6 = NULL;
7980  } else {
7981  __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 528, __pyx_L1_error)
7982  __Pyx_GOTREF(__pyx_t_4);
7983  __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 528, __pyx_L1_error)
7984  }
7985  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7986  for (;;) {
7987  if (likely(!__pyx_t_6)) {
7988  if (likely(PyList_CheckExact(__pyx_t_4))) {
7989  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
7990  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7991  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 528, __pyx_L1_error)
7992  #else
7993  __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
7994  __Pyx_GOTREF(__pyx_t_1);
7995  #endif
7996  } else {
7997  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
7998  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7999  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 528, __pyx_L1_error)
8000  #else
8001  __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
8002  __Pyx_GOTREF(__pyx_t_1);
8003  #endif
8004  }
8005  } else {
8006  __pyx_t_1 = __pyx_t_6(__pyx_t_4);
8007  if (unlikely(!__pyx_t_1)) {
8008  PyObject* exc_type = PyErr_Occurred();
8009  if (exc_type) {
8010  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8011  else __PYX_ERR(0, 528, __pyx_L1_error)
8012  }
8013  break;
8014  }
8015  __Pyx_GOTREF(__pyx_t_1);
8016  }
8017  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
8018  __pyx_t_1 = 0;
8019 
8020  /* "ADR.pyx":529
8021  * for c in [cebq,cebq_global]:
8022  * for ci in range(self.nc):
8023  * if c.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
8024  * if self.velocity is not None:
8025  * c[('df',ci,ci)][...,:] = self.velocity
8026  */
8027  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L1_error)
8028  __Pyx_GOTREF(__pyx_t_7);
8029  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L1_error)
8030  __Pyx_GOTREF(__pyx_t_8);
8031  __Pyx_INCREF(__pyx_n_s_df);
8032  __Pyx_GIVEREF(__pyx_n_s_df);
8033  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_df);
8034  __Pyx_INCREF(__pyx_v_ci);
8035  __Pyx_GIVEREF(__pyx_v_ci);
8036  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ci);
8037  __Pyx_INCREF(__pyx_v_ci);
8038  __Pyx_GIVEREF(__pyx_v_ci);
8039  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_ci);
8040  __pyx_t_9 = NULL;
8041  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
8042  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
8043  if (likely(__pyx_t_9)) {
8044  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
8045  __Pyx_INCREF(__pyx_t_9);
8046  __Pyx_INCREF(function);
8047  __Pyx_DECREF_SET(__pyx_t_7, function);
8048  }
8049  }
8050  if (!__pyx_t_9) {
8051  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
8052  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8053  __Pyx_GOTREF(__pyx_t_1);
8054  } else {
8055  #if CYTHON_FAST_PYCALL
8056  if (PyFunction_Check(__pyx_t_7)) {
8057  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
8058  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
8059  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8060  __Pyx_GOTREF(__pyx_t_1);
8061  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8062  } else
8063  #endif
8064  #if CYTHON_FAST_PYCCALL
8065  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
8066  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
8067  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
8068  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8069  __Pyx_GOTREF(__pyx_t_1);
8070  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8071  } else
8072  #endif
8073  {
8074  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 529, __pyx_L1_error)
8075  __Pyx_GOTREF(__pyx_t_10);
8076  __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
8077  __Pyx_GIVEREF(__pyx_t_8);
8078  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_8);
8079  __pyx_t_8 = 0;
8080  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
8081  __Pyx_GOTREF(__pyx_t_1);
8082  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8083  }
8084  }
8085  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8086  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 529, __pyx_L1_error)
8087  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8088  if (__pyx_t_11) {
8089 
8090  /* "ADR.pyx":530
8091  * for ci in range(self.nc):
8092  * if c.has_key(('df',ci,ci)):
8093  * if self.velocity is not None: # <<<<<<<<<<<<<<
8094  * c[('df',ci,ci)][...,:] = self.velocity
8095  * else:
8096  */
8097  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error)
8098  __Pyx_GOTREF(__pyx_t_1);
8099  __pyx_t_11 = (__pyx_t_1 != Py_None);
8100  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8101  __pyx_t_12 = (__pyx_t_11 != 0);
8102  if (__pyx_t_12) {
8103 
8104  /* "ADR.pyx":531
8105  * if c.has_key(('df',ci,ci)):
8106  * if self.velocity is not None:
8107  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
8108  * else:
8109  * c[('df',ci,ci)].flat[:] = 0.0
8110  */
8111  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error)
8112  __Pyx_GOTREF(__pyx_t_1);
8113  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 531, __pyx_L1_error)
8114  __Pyx_GOTREF(__pyx_t_7);
8115  __Pyx_INCREF(__pyx_n_s_df);
8116  __Pyx_GIVEREF(__pyx_n_s_df);
8117  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_df);
8118  __Pyx_INCREF(__pyx_v_ci);
8119  __Pyx_GIVEREF(__pyx_v_ci);
8120  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
8121  __Pyx_INCREF(__pyx_v_ci);
8122  __Pyx_GIVEREF(__pyx_v_ci);
8123  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
8124  __pyx_t_10 = PyObject_GetItem(__pyx_v_c, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 531, __pyx_L1_error)
8125  __Pyx_GOTREF(__pyx_t_10);
8126  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8127  if (unlikely(PyObject_SetItem(__pyx_t_10, __pyx_tuple__9, __pyx_t_1) < 0)) __PYX_ERR(0, 531, __pyx_L1_error)
8128  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8129  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8130 
8131  /* "ADR.pyx":530
8132  * for ci in range(self.nc):
8133  * if c.has_key(('df',ci,ci)):
8134  * if self.velocity is not None: # <<<<<<<<<<<<<<
8135  * c[('df',ci,ci)][...,:] = self.velocity
8136  * else:
8137  */
8138  goto __pyx_L8;
8139  }
8140 
8141  /* "ADR.pyx":533
8142  * c[('df',ci,ci)][...,:] = self.velocity
8143  * else:
8144  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
8145  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8146  * for i in range(len(c[('u',ci)].flat)):
8147  */
8148  /*else*/ {
8149  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
8150  __Pyx_GOTREF(__pyx_t_1);
8151  __Pyx_INCREF(__pyx_n_s_df);
8152  __Pyx_GIVEREF(__pyx_n_s_df);
8153  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_df);
8154  __Pyx_INCREF(__pyx_v_ci);
8155  __Pyx_GIVEREF(__pyx_v_ci);
8156  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
8157  __Pyx_INCREF(__pyx_v_ci);
8158  __Pyx_GIVEREF(__pyx_v_ci);
8159  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_ci);
8160  __pyx_t_10 = PyObject_GetItem(__pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 533, __pyx_L1_error)
8161  __Pyx_GOTREF(__pyx_t_10);
8162  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8163  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
8164  __Pyx_GOTREF(__pyx_t_1);
8165  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8166  if (__Pyx_PyObject_SetSlice(__pyx_t_1, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__10, 0, 0, 1) < 0) __PYX_ERR(0, 533, __pyx_L1_error)
8167  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8168  }
8169  __pyx_L8:;
8170 
8171  /* "ADR.pyx":529
8172  * for c in [cebq,cebq_global]:
8173  * for ci in range(self.nc):
8174  * if c.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
8175  * if self.velocity is not None:
8176  * c[('df',ci,ci)][...,:] = self.velocity
8177  */
8178  }
8179 
8180  /* "ADR.pyx":534
8181  * else:
8182  * c[('df',ci,ci)].flat[:] = 0.0
8183  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)): # <<<<<<<<<<<<<<
8184  * for i in range(len(c[('u',ci)].flat)):
8185  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8186  */
8187  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 534, __pyx_L1_error)
8188  __Pyx_GOTREF(__pyx_t_10);
8189  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error)
8190  __Pyx_GOTREF(__pyx_t_7);
8191  __Pyx_INCREF(__pyx_n_s_r);
8192  __Pyx_GIVEREF(__pyx_n_s_r);
8193  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_r);
8194  __Pyx_INCREF(__pyx_v_ci);
8195  __Pyx_GIVEREF(__pyx_v_ci);
8196  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
8197  __pyx_t_8 = NULL;
8198  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
8199  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
8200  if (likely(__pyx_t_8)) {
8201  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
8202  __Pyx_INCREF(__pyx_t_8);
8203  __Pyx_INCREF(function);
8204  __Pyx_DECREF_SET(__pyx_t_10, function);
8205  }
8206  }
8207  if (!__pyx_t_8) {
8208  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
8209  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8210  __Pyx_GOTREF(__pyx_t_1);
8211  } else {
8212  #if CYTHON_FAST_PYCALL
8213  if (PyFunction_Check(__pyx_t_10)) {
8214  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
8215  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
8216  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
8217  __Pyx_GOTREF(__pyx_t_1);
8218  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8219  } else
8220  #endif
8221  #if CYTHON_FAST_PYCCALL
8222  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
8223  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
8224  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
8225  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
8226  __Pyx_GOTREF(__pyx_t_1);
8227  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8228  } else
8229  #endif
8230  {
8231  __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 534, __pyx_L1_error)
8232  __Pyx_GOTREF(__pyx_t_9);
8233  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
8234  __Pyx_GIVEREF(__pyx_t_7);
8235  PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7);
8236  __pyx_t_7 = 0;
8237  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
8238  __Pyx_GOTREF(__pyx_t_1);
8239  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8240  }
8241  }
8242  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8243  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
8244  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8245  if (__pyx_t_11) {
8246  } else {
8247  __pyx_t_12 = __pyx_t_11;
8248  goto __pyx_L10_bool_binop_done;
8249  }
8250  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 534, __pyx_L1_error)
8251  __Pyx_GOTREF(__pyx_t_10);
8252  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 534, __pyx_L1_error)
8253  __Pyx_GOTREF(__pyx_t_9);
8254  __Pyx_INCREF(__pyx_n_s_a);
8255  __Pyx_GIVEREF(__pyx_n_s_a);
8256  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_a);
8257  __Pyx_INCREF(__pyx_v_ci);
8258  __Pyx_GIVEREF(__pyx_v_ci);
8259  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ci);
8260  __Pyx_INCREF(__pyx_v_ci);
8261  __Pyx_GIVEREF(__pyx_v_ci);
8262  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_ci);
8263  __pyx_t_7 = NULL;
8264  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
8265  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
8266  if (likely(__pyx_t_7)) {
8267  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
8268  __Pyx_INCREF(__pyx_t_7);
8269  __Pyx_INCREF(function);
8270  __Pyx_DECREF_SET(__pyx_t_10, function);
8271  }
8272  }
8273  if (!__pyx_t_7) {
8274  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
8275  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8276  __Pyx_GOTREF(__pyx_t_1);
8277  } else {
8278  #if CYTHON_FAST_PYCALL
8279  if (PyFunction_Check(__pyx_t_10)) {
8280  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_9};
8281  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
8282  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
8283  __Pyx_GOTREF(__pyx_t_1);
8284  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8285  } else
8286  #endif
8287  #if CYTHON_FAST_PYCCALL
8288  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
8289  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_9};
8290  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
8291  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
8292  __Pyx_GOTREF(__pyx_t_1);
8293  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8294  } else
8295  #endif
8296  {
8297  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 534, __pyx_L1_error)
8298  __Pyx_GOTREF(__pyx_t_8);
8299  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
8300  __Pyx_GIVEREF(__pyx_t_9);
8301  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_9);
8302  __pyx_t_9 = 0;
8303  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
8304  __Pyx_GOTREF(__pyx_t_1);
8305  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8306  }
8307  }
8308  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8309  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
8310  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8311  __pyx_t_12 = __pyx_t_11;
8312  __pyx_L10_bool_binop_done:;
8313  if (__pyx_t_12) {
8314 
8315  /* "ADR.pyx":535
8316  * c[('df',ci,ci)].flat[:] = 0.0
8317  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8318  * for i in range(len(c[('u',ci)].flat)): # <<<<<<<<<<<<<<
8319  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8320  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8321  */
8322  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
8323  __Pyx_GOTREF(__pyx_t_1);
8324  __Pyx_INCREF(__pyx_n_s_u);
8325  __Pyx_GIVEREF(__pyx_n_s_u);
8326  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_u);
8327  __Pyx_INCREF(__pyx_v_ci);
8328  __Pyx_GIVEREF(__pyx_v_ci);
8329  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
8330  __pyx_t_10 = PyObject_GetItem(__pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 535, __pyx_L1_error)
8331  __Pyx_GOTREF(__pyx_t_10);
8332  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8333  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
8334  __Pyx_GOTREF(__pyx_t_1);
8335  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8336  __pyx_t_13 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 535, __pyx_L1_error)
8337  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8338  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
8339  __Pyx_GOTREF(__pyx_t_1);
8340  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 535, __pyx_L1_error)
8341  __Pyx_GOTREF(__pyx_t_10);
8342  __Pyx_GIVEREF(__pyx_t_1);
8343  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
8344  __pyx_t_1 = 0;
8345  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
8346  __Pyx_GOTREF(__pyx_t_1);
8347  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8348  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
8349  __pyx_t_10 = __pyx_t_1; __Pyx_INCREF(__pyx_t_10); __pyx_t_13 = 0;
8350  __pyx_t_14 = NULL;
8351  } else {
8352  __pyx_t_13 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 535, __pyx_L1_error)
8353  __Pyx_GOTREF(__pyx_t_10);
8354  __pyx_t_14 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 535, __pyx_L1_error)
8355  }
8356  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8357  for (;;) {
8358  if (likely(!__pyx_t_14)) {
8359  if (likely(PyList_CheckExact(__pyx_t_10))) {
8360  if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_10)) break;
8361  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8362  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 535, __pyx_L1_error)
8363  #else
8364  __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
8365  __Pyx_GOTREF(__pyx_t_1);
8366  #endif
8367  } else {
8368  if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
8369  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8370  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 535, __pyx_L1_error)
8371  #else
8372  __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
8373  __Pyx_GOTREF(__pyx_t_1);
8374  #endif
8375  }
8376  } else {
8377  __pyx_t_1 = __pyx_t_14(__pyx_t_10);
8378  if (unlikely(!__pyx_t_1)) {
8379  PyObject* exc_type = PyErr_Occurred();
8380  if (exc_type) {
8381  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8382  else __PYX_ERR(0, 535, __pyx_L1_error)
8383  }
8384  break;
8385  }
8386  __Pyx_GOTREF(__pyx_t_1);
8387  }
8388  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
8389  __pyx_t_1 = 0;
8390 
8391  /* "ADR.pyx":536
8392  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8393  * for i in range(len(c[('u',ci)].flat)):
8394  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)]) # <<<<<<<<<<<<<<
8395  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8396  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
8397  */
8398  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fOfX); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
8399  __Pyx_GOTREF(__pyx_t_8);
8400  __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 536, __pyx_L1_error)
8401  __Pyx_GOTREF(__pyx_t_9);
8402  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8403  __pyx_t_8 = PyObject_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
8404  __Pyx_GOTREF(__pyx_t_8);
8405  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error)
8406  __Pyx_GOTREF(__pyx_t_7);
8407  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8408  __pyx_t_8 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
8409  __Pyx_GOTREF(__pyx_t_8);
8410  __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 536, __pyx_L1_error)
8411  __Pyx_GOTREF(__pyx_t_15);
8412  __pyx_t_16 = PyNumber_Multiply(__pyx_int_3, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 536, __pyx_L1_error)
8413  __Pyx_GOTREF(__pyx_t_16);
8414  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8415  __pyx_t_15 = __Pyx_PyObject_GetSlice(__pyx_t_7, 0, 0, &__pyx_t_8, &__pyx_t_16, NULL, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 536, __pyx_L1_error)
8416  __Pyx_GOTREF(__pyx_t_15);
8417  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8418  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8419  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8420  __pyx_t_16 = NULL;
8421  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
8422  __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9);
8423  if (likely(__pyx_t_16)) {
8424  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
8425  __Pyx_INCREF(__pyx_t_16);
8426  __Pyx_INCREF(function);
8427  __Pyx_DECREF_SET(__pyx_t_9, function);
8428  }
8429  }
8430  if (!__pyx_t_16) {
8431  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
8432  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8433  __Pyx_GOTREF(__pyx_t_1);
8434  } else {
8435  #if CYTHON_FAST_PYCALL
8436  if (PyFunction_Check(__pyx_t_9)) {
8437  PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_15};
8438  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
8439  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
8440  __Pyx_GOTREF(__pyx_t_1);
8441  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8442  } else
8443  #endif
8444  #if CYTHON_FAST_PYCCALL
8445  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
8446  PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_15};
8447  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
8448  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
8449  __Pyx_GOTREF(__pyx_t_1);
8450  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8451  } else
8452  #endif
8453  {
8454  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
8455  __Pyx_GOTREF(__pyx_t_8);
8456  __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_16); __pyx_t_16 = NULL;
8457  __Pyx_GIVEREF(__pyx_t_15);
8458  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_15);
8459  __pyx_t_15 = 0;
8460  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
8461  __Pyx_GOTREF(__pyx_t_1);
8462  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8463  }
8464  }
8465  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8466  __pyx_t_9 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 536, __pyx_L1_error)
8467  __Pyx_GOTREF(__pyx_t_9);
8468  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8469  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
8470  __Pyx_GOTREF(__pyx_t_1);
8471  __Pyx_INCREF(__pyx_n_s_r);
8472  __Pyx_GIVEREF(__pyx_n_s_r);
8473  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_r);
8474  __Pyx_INCREF(__pyx_v_ci);
8475  __Pyx_GIVEREF(__pyx_v_ci);
8476  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
8477  __pyx_t_8 = PyObject_GetItem(__pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
8478  __Pyx_GOTREF(__pyx_t_8);
8479  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8480  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
8481  __Pyx_GOTREF(__pyx_t_1);
8482  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8483  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 536, __pyx_L1_error)
8484  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8485  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8486 
8487  /* "ADR.pyx":537
8488  * for i in range(len(c[('u',ci)].flat)):
8489  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8490  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat # <<<<<<<<<<<<<<
8491  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
8492  * nd = self.nd
8493  */
8494  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aOfX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
8495  __Pyx_GOTREF(__pyx_t_1);
8496  __pyx_t_8 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 537, __pyx_L1_error)
8497  __Pyx_GOTREF(__pyx_t_8);
8498  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8499  __pyx_t_1 = PyObject_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
8500  __Pyx_GOTREF(__pyx_t_1);
8501  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 537, __pyx_L1_error)
8502  __Pyx_GOTREF(__pyx_t_15);
8503  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8504  __pyx_t_1 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
8505  __Pyx_GOTREF(__pyx_t_1);
8506  __pyx_t_16 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 537, __pyx_L1_error)
8507  __Pyx_GOTREF(__pyx_t_16);
8508  __pyx_t_7 = PyNumber_Multiply(__pyx_int_3, __pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 537, __pyx_L1_error)
8509  __Pyx_GOTREF(__pyx_t_7);
8510  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8511  __pyx_t_16 = __Pyx_PyObject_GetSlice(__pyx_t_15, 0, 0, &__pyx_t_1, &__pyx_t_7, NULL, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 537, __pyx_L1_error)
8512  __Pyx_GOTREF(__pyx_t_16);
8513  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8514  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8515  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8516  __pyx_t_7 = NULL;
8517  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
8518  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
8519  if (likely(__pyx_t_7)) {
8520  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
8521  __Pyx_INCREF(__pyx_t_7);
8522  __Pyx_INCREF(function);
8523  __Pyx_DECREF_SET(__pyx_t_8, function);
8524  }
8525  }
8526  if (!__pyx_t_7) {
8527  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error)
8528  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8529  __Pyx_GOTREF(__pyx_t_9);
8530  } else {
8531  #if CYTHON_FAST_PYCALL
8532  if (PyFunction_Check(__pyx_t_8)) {
8533  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_16};
8534  __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error)
8535  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
8536  __Pyx_GOTREF(__pyx_t_9);
8537  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8538  } else
8539  #endif
8540  #if CYTHON_FAST_PYCCALL
8541  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
8542  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_16};
8543  __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error)
8544  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
8545  __Pyx_GOTREF(__pyx_t_9);
8546  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8547  } else
8548  #endif
8549  {
8550  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
8551  __Pyx_GOTREF(__pyx_t_1);
8552  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
8553  __Pyx_GIVEREF(__pyx_t_16);
8554  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_16);
8555  __pyx_t_16 = 0;
8556  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error)
8557  __Pyx_GOTREF(__pyx_t_9);
8558  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8559  }
8560  }
8561  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8562  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_flat); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 537, __pyx_L1_error)
8563  __Pyx_GOTREF(__pyx_t_8);
8564  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8565  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error)
8566  __Pyx_GOTREF(__pyx_t_9);
8567  __Pyx_INCREF(__pyx_n_s_a);
8568  __Pyx_GIVEREF(__pyx_n_s_a);
8569  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_a);
8570  __Pyx_INCREF(__pyx_v_ci);
8571  __Pyx_GIVEREF(__pyx_v_ci);
8572  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ci);
8573  __Pyx_INCREF(__pyx_v_ci);
8574  __Pyx_GIVEREF(__pyx_v_ci);
8575  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_ci);
8576  __pyx_t_1 = PyObject_GetItem(__pyx_v_c, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
8577  __Pyx_GOTREF(__pyx_t_1);
8578  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8579  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error)
8580  __Pyx_GOTREF(__pyx_t_9);
8581  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8582  __pyx_t_1 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
8583  __Pyx_GOTREF(__pyx_t_1);
8584  __pyx_t_16 = PyNumber_Multiply(__pyx_t_1, __pyx_v_i); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 537, __pyx_L1_error)
8585  __Pyx_GOTREF(__pyx_t_16);
8586  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8587  __pyx_t_1 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
8588  __Pyx_GOTREF(__pyx_t_1);
8589  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 537, __pyx_L1_error)
8590  __Pyx_GOTREF(__pyx_t_7);
8591  __pyx_t_15 = PyNumber_Multiply(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 537, __pyx_L1_error)
8592  __Pyx_GOTREF(__pyx_t_15);
8593  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8594  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8595  if (__Pyx_PyObject_SetSlice(__pyx_t_9, __pyx_t_8, 0, 0, &__pyx_t_16, &__pyx_t_15, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
8596  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8597  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8598  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8599  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8600 
8601  /* "ADR.pyx":535
8602  * c[('df',ci,ci)].flat[:] = 0.0
8603  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8604  * for i in range(len(c[('u',ci)].flat)): # <<<<<<<<<<<<<<
8605  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8606  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8607  */
8608  }
8609  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8610 
8611  /* "ADR.pyx":534
8612  * else:
8613  * c[('df',ci,ci)].flat[:] = 0.0
8614  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)): # <<<<<<<<<<<<<<
8615  * for i in range(len(c[('u',ci)].flat)):
8616  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8617  */
8618  }
8619 
8620  /* "ADR.pyx":528
8621  * nd = self.nd
8622  * for c in [cebq,cebq_global]:
8623  * for ci in range(self.nc): # <<<<<<<<<<<<<<
8624  * if c.has_key(('df',ci,ci)):
8625  * if self.velocity is not None:
8626  */
8627  }
8628  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8629 
8630  /* "ADR.pyx":527
8631  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
8632  * nd = self.nd
8633  * for c in [cebq,cebq_global]: # <<<<<<<<<<<<<<
8634  * for ci in range(self.nc):
8635  * if c.has_key(('df',ci,ci)):
8636  */
8637  }
8638  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8639 
8640  /* "ADR.pyx":525
8641  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
8642  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
8643  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global): # <<<<<<<<<<<<<<
8644  * nd = self.nd
8645  * for c in [cebq,cebq_global]:
8646  */
8647 
8648  /* function exit code */
8649  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8650  goto __pyx_L0;
8651  __pyx_L1_error:;
8652  __Pyx_XDECREF(__pyx_t_1);
8653  __Pyx_XDECREF(__pyx_t_2);
8654  __Pyx_XDECREF(__pyx_t_4);
8655  __Pyx_XDECREF(__pyx_t_7);
8656  __Pyx_XDECREF(__pyx_t_8);
8657  __Pyx_XDECREF(__pyx_t_9);
8658  __Pyx_XDECREF(__pyx_t_10);
8659  __Pyx_XDECREF(__pyx_t_15);
8660  __Pyx_XDECREF(__pyx_t_16);
8661  __Pyx_AddTraceback("ADR.Coefficients.initializeElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
8662  __pyx_r = NULL;
8663  __pyx_L0:;
8664  __Pyx_XDECREF(__pyx_v_nd);
8665  __Pyx_XDECREF(__pyx_v_c);
8666  __Pyx_XDECREF(__pyx_v_ci);
8667  __Pyx_XDECREF(__pyx_v_i);
8668  __Pyx_XGIVEREF(__pyx_r);
8669  __Pyx_RefNannyFinishContext();
8670  return __pyx_r;
8671 }
8672 
8673 /* "ADR.pyx":538
8674  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8675  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8676  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe): # <<<<<<<<<<<<<<
8677  * nd = self.nd
8678  * for c in [cebqe]:
8679  */
8680 
8681 /* Python wrapper */
8682 static PyObject *__pyx_pw_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8683 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature = {"initializeGlobalExteriorElementBoundaryQuadrature", (PyCFunction)__pyx_pw_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
8684 static PyObject *__pyx_pw_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8685  PyObject *__pyx_v_self = 0;
8686  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
8687  PyObject *__pyx_v_cebqe = 0;
8688  PyObject *__pyx_r = 0;
8689  __Pyx_RefNannyDeclarations
8690  __Pyx_RefNannySetupContext("initializeGlobalExteriorElementBoundaryQuadrature (wrapper)", 0);
8691  {
8692  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,&__pyx_n_s_cebqe,0};
8693  PyObject* values[3] = {0,0,0};
8694  if (unlikely(__pyx_kwds)) {
8695  Py_ssize_t kw_args;
8696  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8697  switch (pos_args) {
8698  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8699  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8700  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8701  case 0: break;
8702  default: goto __pyx_L5_argtuple_error;
8703  }
8704  kw_args = PyDict_Size(__pyx_kwds);
8705  switch (pos_args) {
8706  case 0:
8707  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
8708  else goto __pyx_L5_argtuple_error;
8709  case 1:
8710  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
8711  else {
8712  __Pyx_RaiseArgtupleInvalid("initializeGlobalExteriorElementBoundaryQuadrature", 1, 3, 3, 1); __PYX_ERR(0, 538, __pyx_L3_error)
8713  }
8714  case 2:
8715  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cebqe)) != 0)) kw_args--;
8716  else {
8717  __Pyx_RaiseArgtupleInvalid("initializeGlobalExteriorElementBoundaryQuadrature", 1, 3, 3, 2); __PYX_ERR(0, 538, __pyx_L3_error)
8718  }
8719  }
8720  if (unlikely(kw_args > 0)) {
8721  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeGlobalExteriorElementBoundaryQuadrature") < 0)) __PYX_ERR(0, 538, __pyx_L3_error)
8722  }
8723  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
8724  goto __pyx_L5_argtuple_error;
8725  } else {
8726  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8727  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8728  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8729  }
8730  __pyx_v_self = values[0];
8731  __pyx_v_t = values[1];
8732  __pyx_v_cebqe = values[2];
8733  }
8734  goto __pyx_L4_argument_unpacking_done;
8735  __pyx_L5_argtuple_error:;
8736  __Pyx_RaiseArgtupleInvalid("initializeGlobalExteriorElementBoundaryQuadrature", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 538, __pyx_L3_error)
8737  __pyx_L3_error:;
8738  __Pyx_AddTraceback("ADR.Coefficients.initializeGlobalExteriorElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
8739  __Pyx_RefNannyFinishContext();
8740  return NULL;
8741  __pyx_L4_argument_unpacking_done:;
8742  __pyx_r = __pyx_pf_3ADR_12Coefficients_6initializeGlobalExteriorElementBoundaryQuadrature(__pyx_self, __pyx_v_self, __pyx_v_t, __pyx_v_cebqe);
8743 
8744  /* function exit code */
8745  __Pyx_RefNannyFinishContext();
8746  return __pyx_r;
8747 }
8748 
8749 static PyObject *__pyx_pf_3ADR_12Coefficients_6initializeGlobalExteriorElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cebqe) {
8750  PyObject *__pyx_v_nd = NULL;
8751  PyObject *__pyx_v_c = NULL;
8752  PyObject *__pyx_v_ci = NULL;
8753  PyObject *__pyx_v_i = NULL;
8754  PyObject *__pyx_r = NULL;
8755  __Pyx_RefNannyDeclarations
8756  PyObject *__pyx_t_1 = NULL;
8757  PyObject *__pyx_t_2 = NULL;
8758  Py_ssize_t __pyx_t_3;
8759  PyObject *__pyx_t_4 = NULL;
8760  Py_ssize_t __pyx_t_5;
8761  PyObject *(*__pyx_t_6)(PyObject *);
8762  PyObject *__pyx_t_7 = NULL;
8763  PyObject *__pyx_t_8 = NULL;
8764  PyObject *__pyx_t_9 = NULL;
8765  PyObject *__pyx_t_10 = NULL;
8766  int __pyx_t_11;
8767  int __pyx_t_12;
8768  Py_ssize_t __pyx_t_13;
8769  PyObject *(*__pyx_t_14)(PyObject *);
8770  PyObject *__pyx_t_15 = NULL;
8771  PyObject *__pyx_t_16 = NULL;
8772  __Pyx_RefNannySetupContext("initializeGlobalExteriorElementBoundaryQuadrature", 0);
8773 
8774  /* "ADR.pyx":539
8775  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8776  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
8777  * nd = self.nd # <<<<<<<<<<<<<<
8778  * for c in [cebqe]:
8779  * for ci in range(self.nc):
8780  */
8781  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
8782  __Pyx_GOTREF(__pyx_t_1);
8783  __pyx_v_nd = __pyx_t_1;
8784  __pyx_t_1 = 0;
8785 
8786  /* "ADR.pyx":540
8787  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
8788  * nd = self.nd
8789  * for c in [cebqe]: # <<<<<<<<<<<<<<
8790  * for ci in range(self.nc):
8791  * if c.has_key(('df',ci,ci)):
8792  */
8793  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
8794  __Pyx_GOTREF(__pyx_t_1);
8795  __Pyx_INCREF(__pyx_v_cebqe);
8796  __Pyx_GIVEREF(__pyx_v_cebqe);
8797  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cebqe);
8798  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
8799  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8800  for (;;) {
8801  if (__pyx_t_3 >= 1) break;
8802  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8803  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 540, __pyx_L1_error)
8804  #else
8805  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
8806  __Pyx_GOTREF(__pyx_t_1);
8807  #endif
8808  __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1);
8809  __pyx_t_1 = 0;
8810 
8811  /* "ADR.pyx":541
8812  * nd = self.nd
8813  * for c in [cebqe]:
8814  * for ci in range(self.nc): # <<<<<<<<<<<<<<
8815  * if c.has_key(('df',ci,ci)):
8816  * if self.velocity is not None:
8817  */
8818  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
8819  __Pyx_GOTREF(__pyx_t_1);
8820  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error)
8821  __Pyx_GOTREF(__pyx_t_4);
8822  __Pyx_GIVEREF(__pyx_t_1);
8823  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
8824  __pyx_t_1 = 0;
8825  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
8826  __Pyx_GOTREF(__pyx_t_1);
8827  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8828  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
8829  __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
8830  __pyx_t_6 = NULL;
8831  } else {
8832  __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error)
8833  __Pyx_GOTREF(__pyx_t_4);
8834  __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 541, __pyx_L1_error)
8835  }
8836  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8837  for (;;) {
8838  if (likely(!__pyx_t_6)) {
8839  if (likely(PyList_CheckExact(__pyx_t_4))) {
8840  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
8841  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8842  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 541, __pyx_L1_error)
8843  #else
8844  __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
8845  __Pyx_GOTREF(__pyx_t_1);
8846  #endif
8847  } else {
8848  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
8849  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8850  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 541, __pyx_L1_error)
8851  #else
8852  __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
8853  __Pyx_GOTREF(__pyx_t_1);
8854  #endif
8855  }
8856  } else {
8857  __pyx_t_1 = __pyx_t_6(__pyx_t_4);
8858  if (unlikely(!__pyx_t_1)) {
8859  PyObject* exc_type = PyErr_Occurred();
8860  if (exc_type) {
8861  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8862  else __PYX_ERR(0, 541, __pyx_L1_error)
8863  }
8864  break;
8865  }
8866  __Pyx_GOTREF(__pyx_t_1);
8867  }
8868  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
8869  __pyx_t_1 = 0;
8870 
8871  /* "ADR.pyx":542
8872  * for c in [cebqe]:
8873  * for ci in range(self.nc):
8874  * if c.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
8875  * if self.velocity is not None:
8876  * c[('df',ci,ci)][...,:] = self.velocity
8877  */
8878  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 542, __pyx_L1_error)
8879  __Pyx_GOTREF(__pyx_t_7);
8880  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 542, __pyx_L1_error)
8881  __Pyx_GOTREF(__pyx_t_8);
8882  __Pyx_INCREF(__pyx_n_s_df);
8883  __Pyx_GIVEREF(__pyx_n_s_df);
8884  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_df);
8885  __Pyx_INCREF(__pyx_v_ci);
8886  __Pyx_GIVEREF(__pyx_v_ci);
8887  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ci);
8888  __Pyx_INCREF(__pyx_v_ci);
8889  __Pyx_GIVEREF(__pyx_v_ci);
8890  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_ci);
8891  __pyx_t_9 = NULL;
8892  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
8893  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
8894  if (likely(__pyx_t_9)) {
8895  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
8896  __Pyx_INCREF(__pyx_t_9);
8897  __Pyx_INCREF(function);
8898  __Pyx_DECREF_SET(__pyx_t_7, function);
8899  }
8900  }
8901  if (!__pyx_t_9) {
8902  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
8903  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8904  __Pyx_GOTREF(__pyx_t_1);
8905  } else {
8906  #if CYTHON_FAST_PYCALL
8907  if (PyFunction_Check(__pyx_t_7)) {
8908  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
8909  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
8910  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8911  __Pyx_GOTREF(__pyx_t_1);
8912  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8913  } else
8914  #endif
8915  #if CYTHON_FAST_PYCCALL
8916  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
8917  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
8918  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
8919  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8920  __Pyx_GOTREF(__pyx_t_1);
8921  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8922  } else
8923  #endif
8924  {
8925  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 542, __pyx_L1_error)
8926  __Pyx_GOTREF(__pyx_t_10);
8927  __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
8928  __Pyx_GIVEREF(__pyx_t_8);
8929  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_8);
8930  __pyx_t_8 = 0;
8931  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
8932  __Pyx_GOTREF(__pyx_t_1);
8933  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8934  }
8935  }
8936  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8937  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 542, __pyx_L1_error)
8938  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8939  if (__pyx_t_11) {
8940 
8941  /* "ADR.pyx":543
8942  * for ci in range(self.nc):
8943  * if c.has_key(('df',ci,ci)):
8944  * if self.velocity is not None: # <<<<<<<<<<<<<<
8945  * c[('df',ci,ci)][...,:] = self.velocity
8946  * else:
8947  */
8948  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
8949  __Pyx_GOTREF(__pyx_t_1);
8950  __pyx_t_11 = (__pyx_t_1 != Py_None);
8951  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8952  __pyx_t_12 = (__pyx_t_11 != 0);
8953  if (__pyx_t_12) {
8954 
8955  /* "ADR.pyx":544
8956  * if c.has_key(('df',ci,ci)):
8957  * if self.velocity is not None:
8958  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
8959  * else:
8960  * c[('df',ci,ci)].flat[:] = 0.0
8961  */
8962  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
8963  __Pyx_GOTREF(__pyx_t_1);
8964  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 544, __pyx_L1_error)
8965  __Pyx_GOTREF(__pyx_t_7);
8966  __Pyx_INCREF(__pyx_n_s_df);
8967  __Pyx_GIVEREF(__pyx_n_s_df);
8968  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_df);
8969  __Pyx_INCREF(__pyx_v_ci);
8970  __Pyx_GIVEREF(__pyx_v_ci);
8971  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
8972  __Pyx_INCREF(__pyx_v_ci);
8973  __Pyx_GIVEREF(__pyx_v_ci);
8974  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
8975  __pyx_t_10 = PyObject_GetItem(__pyx_v_c, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 544, __pyx_L1_error)
8976  __Pyx_GOTREF(__pyx_t_10);
8977  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8978  if (unlikely(PyObject_SetItem(__pyx_t_10, __pyx_tuple__12, __pyx_t_1) < 0)) __PYX_ERR(0, 544, __pyx_L1_error)
8979  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8980  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8981 
8982  /* "ADR.pyx":543
8983  * for ci in range(self.nc):
8984  * if c.has_key(('df',ci,ci)):
8985  * if self.velocity is not None: # <<<<<<<<<<<<<<
8986  * c[('df',ci,ci)][...,:] = self.velocity
8987  * else:
8988  */
8989  goto __pyx_L8;
8990  }
8991 
8992  /* "ADR.pyx":546
8993  * c[('df',ci,ci)][...,:] = self.velocity
8994  * else:
8995  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
8996  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8997  * for i in range(len(c[('u',ci)].flat)):
8998  */
8999  /*else*/ {
9000  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
9001  __Pyx_GOTREF(__pyx_t_1);
9002  __Pyx_INCREF(__pyx_n_s_df);
9003  __Pyx_GIVEREF(__pyx_n_s_df);
9004  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_df);
9005  __Pyx_INCREF(__pyx_v_ci);
9006  __Pyx_GIVEREF(__pyx_v_ci);
9007  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
9008  __Pyx_INCREF(__pyx_v_ci);
9009  __Pyx_GIVEREF(__pyx_v_ci);
9010  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_ci);
9011  __pyx_t_10 = PyObject_GetItem(__pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 546, __pyx_L1_error)
9012  __Pyx_GOTREF(__pyx_t_10);
9013  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9014  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
9015  __Pyx_GOTREF(__pyx_t_1);
9016  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9017  if (__Pyx_PyObject_SetSlice(__pyx_t_1, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__13, 0, 0, 1) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
9018  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9019  }
9020  __pyx_L8:;
9021 
9022  /* "ADR.pyx":542
9023  * for c in [cebqe]:
9024  * for ci in range(self.nc):
9025  * if c.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
9026  * if self.velocity is not None:
9027  * c[('df',ci,ci)][...,:] = self.velocity
9028  */
9029  }
9030 
9031  /* "ADR.pyx":547
9032  * else:
9033  * c[('df',ci,ci)].flat[:] = 0.0
9034  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)): # <<<<<<<<<<<<<<
9035  * for i in range(len(c[('u',ci)].flat)):
9036  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9037  */
9038  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 547, __pyx_L1_error)
9039  __Pyx_GOTREF(__pyx_t_10);
9040  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error)
9041  __Pyx_GOTREF(__pyx_t_7);
9042  __Pyx_INCREF(__pyx_n_s_r);
9043  __Pyx_GIVEREF(__pyx_n_s_r);
9044  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_r);
9045  __Pyx_INCREF(__pyx_v_ci);
9046  __Pyx_GIVEREF(__pyx_v_ci);
9047  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
9048  __pyx_t_8 = NULL;
9049  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
9050  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
9051  if (likely(__pyx_t_8)) {
9052  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
9053  __Pyx_INCREF(__pyx_t_8);
9054  __Pyx_INCREF(function);
9055  __Pyx_DECREF_SET(__pyx_t_10, function);
9056  }
9057  }
9058  if (!__pyx_t_8) {
9059  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
9060  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9061  __Pyx_GOTREF(__pyx_t_1);
9062  } else {
9063  #if CYTHON_FAST_PYCALL
9064  if (PyFunction_Check(__pyx_t_10)) {
9065  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
9066  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
9067  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9068  __Pyx_GOTREF(__pyx_t_1);
9069  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9070  } else
9071  #endif
9072  #if CYTHON_FAST_PYCCALL
9073  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
9074  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
9075  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
9076  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9077  __Pyx_GOTREF(__pyx_t_1);
9078  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9079  } else
9080  #endif
9081  {
9082  __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 547, __pyx_L1_error)
9083  __Pyx_GOTREF(__pyx_t_9);
9084  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
9085  __Pyx_GIVEREF(__pyx_t_7);
9086  PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7);
9087  __pyx_t_7 = 0;
9088  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
9089  __Pyx_GOTREF(__pyx_t_1);
9090  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9091  }
9092  }
9093  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9094  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 547, __pyx_L1_error)
9095  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9096  if (__pyx_t_11) {
9097  } else {
9098  __pyx_t_12 = __pyx_t_11;
9099  goto __pyx_L10_bool_binop_done;
9100  }
9101  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 547, __pyx_L1_error)
9102  __Pyx_GOTREF(__pyx_t_10);
9103  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 547, __pyx_L1_error)
9104  __Pyx_GOTREF(__pyx_t_9);
9105  __Pyx_INCREF(__pyx_n_s_a);
9106  __Pyx_GIVEREF(__pyx_n_s_a);
9107  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_a);
9108  __Pyx_INCREF(__pyx_v_ci);
9109  __Pyx_GIVEREF(__pyx_v_ci);
9110  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ci);
9111  __Pyx_INCREF(__pyx_v_ci);
9112  __Pyx_GIVEREF(__pyx_v_ci);
9113  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_ci);
9114  __pyx_t_7 = NULL;
9115  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
9116  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
9117  if (likely(__pyx_t_7)) {
9118  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
9119  __Pyx_INCREF(__pyx_t_7);
9120  __Pyx_INCREF(function);
9121  __Pyx_DECREF_SET(__pyx_t_10, function);
9122  }
9123  }
9124  if (!__pyx_t_7) {
9125  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
9126  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9127  __Pyx_GOTREF(__pyx_t_1);
9128  } else {
9129  #if CYTHON_FAST_PYCALL
9130  if (PyFunction_Check(__pyx_t_10)) {
9131  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_9};
9132  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
9133  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9134  __Pyx_GOTREF(__pyx_t_1);
9135  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9136  } else
9137  #endif
9138  #if CYTHON_FAST_PYCCALL
9139  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
9140  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_9};
9141  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
9142  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9143  __Pyx_GOTREF(__pyx_t_1);
9144  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9145  } else
9146  #endif
9147  {
9148  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 547, __pyx_L1_error)
9149  __Pyx_GOTREF(__pyx_t_8);
9150  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
9151  __Pyx_GIVEREF(__pyx_t_9);
9152  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_9);
9153  __pyx_t_9 = 0;
9154  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
9155  __Pyx_GOTREF(__pyx_t_1);
9156  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9157  }
9158  }
9159  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9160  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 547, __pyx_L1_error)
9161  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9162  __pyx_t_12 = __pyx_t_11;
9163  __pyx_L10_bool_binop_done:;
9164  if (__pyx_t_12) {
9165 
9166  /* "ADR.pyx":548
9167  * c[('df',ci,ci)].flat[:] = 0.0
9168  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
9169  * for i in range(len(c[('u',ci)].flat)): # <<<<<<<<<<<<<<
9170  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9171  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9172  */
9173  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
9174  __Pyx_GOTREF(__pyx_t_1);
9175  __Pyx_INCREF(__pyx_n_s_u);
9176  __Pyx_GIVEREF(__pyx_n_s_u);
9177  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_u);
9178  __Pyx_INCREF(__pyx_v_ci);
9179  __Pyx_GIVEREF(__pyx_v_ci);
9180  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
9181  __pyx_t_10 = PyObject_GetItem(__pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 548, __pyx_L1_error)
9182  __Pyx_GOTREF(__pyx_t_10);
9183  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9184  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
9185  __Pyx_GOTREF(__pyx_t_1);
9186  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9187  __pyx_t_13 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 548, __pyx_L1_error)
9188  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9189  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
9190  __Pyx_GOTREF(__pyx_t_1);
9191  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 548, __pyx_L1_error)
9192  __Pyx_GOTREF(__pyx_t_10);
9193  __Pyx_GIVEREF(__pyx_t_1);
9194  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
9195  __pyx_t_1 = 0;
9196  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
9197  __Pyx_GOTREF(__pyx_t_1);
9198  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9199  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
9200  __pyx_t_10 = __pyx_t_1; __Pyx_INCREF(__pyx_t_10); __pyx_t_13 = 0;
9201  __pyx_t_14 = NULL;
9202  } else {
9203  __pyx_t_13 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 548, __pyx_L1_error)
9204  __Pyx_GOTREF(__pyx_t_10);
9205  __pyx_t_14 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 548, __pyx_L1_error)
9206  }
9207  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9208  for (;;) {
9209  if (likely(!__pyx_t_14)) {
9210  if (likely(PyList_CheckExact(__pyx_t_10))) {
9211  if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_10)) break;
9212  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9213  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 548, __pyx_L1_error)
9214  #else
9215  __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
9216  __Pyx_GOTREF(__pyx_t_1);
9217  #endif
9218  } else {
9219  if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
9220  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9221  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 548, __pyx_L1_error)
9222  #else
9223  __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
9224  __Pyx_GOTREF(__pyx_t_1);
9225  #endif
9226  }
9227  } else {
9228  __pyx_t_1 = __pyx_t_14(__pyx_t_10);
9229  if (unlikely(!__pyx_t_1)) {
9230  PyObject* exc_type = PyErr_Occurred();
9231  if (exc_type) {
9232  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9233  else __PYX_ERR(0, 548, __pyx_L1_error)
9234  }
9235  break;
9236  }
9237  __Pyx_GOTREF(__pyx_t_1);
9238  }
9239  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
9240  __pyx_t_1 = 0;
9241 
9242  /* "ADR.pyx":549
9243  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
9244  * for i in range(len(c[('u',ci)].flat)):
9245  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)]) # <<<<<<<<<<<<<<
9246  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9247  * def evaluate(self,t,c):
9248  */
9249  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fOfX); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 549, __pyx_L1_error)
9250  __Pyx_GOTREF(__pyx_t_8);
9251  __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 549, __pyx_L1_error)
9252  __Pyx_GOTREF(__pyx_t_9);
9253  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9254  __pyx_t_8 = PyObject_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 549, __pyx_L1_error)
9255  __Pyx_GOTREF(__pyx_t_8);
9256  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 549, __pyx_L1_error)
9257  __Pyx_GOTREF(__pyx_t_7);
9258  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9259  __pyx_t_8 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 549, __pyx_L1_error)
9260  __Pyx_GOTREF(__pyx_t_8);
9261  __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 549, __pyx_L1_error)
9262  __Pyx_GOTREF(__pyx_t_15);
9263  __pyx_t_16 = PyNumber_Multiply(__pyx_int_3, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 549, __pyx_L1_error)
9264  __Pyx_GOTREF(__pyx_t_16);
9265  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9266  __pyx_t_15 = __Pyx_PyObject_GetSlice(__pyx_t_7, 0, 0, &__pyx_t_8, &__pyx_t_16, NULL, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 549, __pyx_L1_error)
9267  __Pyx_GOTREF(__pyx_t_15);
9268  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9269  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9270  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9271  __pyx_t_16 = NULL;
9272  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
9273  __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9);
9274  if (likely(__pyx_t_16)) {
9275  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
9276  __Pyx_INCREF(__pyx_t_16);
9277  __Pyx_INCREF(function);
9278  __Pyx_DECREF_SET(__pyx_t_9, function);
9279  }
9280  }
9281  if (!__pyx_t_16) {
9282  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
9283  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9284  __Pyx_GOTREF(__pyx_t_1);
9285  } else {
9286  #if CYTHON_FAST_PYCALL
9287  if (PyFunction_Check(__pyx_t_9)) {
9288  PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_15};
9289  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
9290  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
9291  __Pyx_GOTREF(__pyx_t_1);
9292  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9293  } else
9294  #endif
9295  #if CYTHON_FAST_PYCCALL
9296  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
9297  PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_15};
9298  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
9299  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
9300  __Pyx_GOTREF(__pyx_t_1);
9301  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9302  } else
9303  #endif
9304  {
9305  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 549, __pyx_L1_error)
9306  __Pyx_GOTREF(__pyx_t_8);
9307  __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_16); __pyx_t_16 = NULL;
9308  __Pyx_GIVEREF(__pyx_t_15);
9309  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_15);
9310  __pyx_t_15 = 0;
9311  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
9312  __Pyx_GOTREF(__pyx_t_1);
9313  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9314  }
9315  }
9316  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9317  __pyx_t_9 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 549, __pyx_L1_error)
9318  __Pyx_GOTREF(__pyx_t_9);
9319  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9320  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
9321  __Pyx_GOTREF(__pyx_t_1);
9322  __Pyx_INCREF(__pyx_n_s_r);
9323  __Pyx_GIVEREF(__pyx_n_s_r);
9324  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_r);
9325  __Pyx_INCREF(__pyx_v_ci);
9326  __Pyx_GIVEREF(__pyx_v_ci);
9327  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
9328  __pyx_t_8 = PyObject_GetItem(__pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 549, __pyx_L1_error)
9329  __Pyx_GOTREF(__pyx_t_8);
9330  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9331  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
9332  __Pyx_GOTREF(__pyx_t_1);
9333  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9334  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 549, __pyx_L1_error)
9335  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9336  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9337 
9338  /* "ADR.pyx":550
9339  * for i in range(len(c[('u',ci)].flat)):
9340  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9341  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat # <<<<<<<<<<<<<<
9342  * def evaluate(self,t,c):
9343  * if self.timeVaryingCoefficients:
9344  */
9345  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aOfX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
9346  __Pyx_GOTREF(__pyx_t_1);
9347  __pyx_t_8 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 550, __pyx_L1_error)
9348  __Pyx_GOTREF(__pyx_t_8);
9349  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9350  __pyx_t_1 = PyObject_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
9351  __Pyx_GOTREF(__pyx_t_1);
9352  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 550, __pyx_L1_error)
9353  __Pyx_GOTREF(__pyx_t_15);
9354  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9355  __pyx_t_1 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
9356  __Pyx_GOTREF(__pyx_t_1);
9357  __pyx_t_16 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 550, __pyx_L1_error)
9358  __Pyx_GOTREF(__pyx_t_16);
9359  __pyx_t_7 = PyNumber_Multiply(__pyx_int_3, __pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 550, __pyx_L1_error)
9360  __Pyx_GOTREF(__pyx_t_7);
9361  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9362  __pyx_t_16 = __Pyx_PyObject_GetSlice(__pyx_t_15, 0, 0, &__pyx_t_1, &__pyx_t_7, NULL, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 550, __pyx_L1_error)
9363  __Pyx_GOTREF(__pyx_t_16);
9364  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9365  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9366  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9367  __pyx_t_7 = NULL;
9368  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
9369  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
9370  if (likely(__pyx_t_7)) {
9371  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
9372  __Pyx_INCREF(__pyx_t_7);
9373  __Pyx_INCREF(function);
9374  __Pyx_DECREF_SET(__pyx_t_8, function);
9375  }
9376  }
9377  if (!__pyx_t_7) {
9378  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error)
9379  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9380  __Pyx_GOTREF(__pyx_t_9);
9381  } else {
9382  #if CYTHON_FAST_PYCALL
9383  if (PyFunction_Check(__pyx_t_8)) {
9384  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_16};
9385  __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error)
9386  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9387  __Pyx_GOTREF(__pyx_t_9);
9388  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9389  } else
9390  #endif
9391  #if CYTHON_FAST_PYCCALL
9392  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
9393  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_16};
9394  __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error)
9395  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9396  __Pyx_GOTREF(__pyx_t_9);
9397  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9398  } else
9399  #endif
9400  {
9401  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
9402  __Pyx_GOTREF(__pyx_t_1);
9403  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
9404  __Pyx_GIVEREF(__pyx_t_16);
9405  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_16);
9406  __pyx_t_16 = 0;
9407  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error)
9408  __Pyx_GOTREF(__pyx_t_9);
9409  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9410  }
9411  }
9412  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9413  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_flat); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 550, __pyx_L1_error)
9414  __Pyx_GOTREF(__pyx_t_8);
9415  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9416  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error)
9417  __Pyx_GOTREF(__pyx_t_9);
9418  __Pyx_INCREF(__pyx_n_s_a);
9419  __Pyx_GIVEREF(__pyx_n_s_a);
9420  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_a);
9421  __Pyx_INCREF(__pyx_v_ci);
9422  __Pyx_GIVEREF(__pyx_v_ci);
9423  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ci);
9424  __Pyx_INCREF(__pyx_v_ci);
9425  __Pyx_GIVEREF(__pyx_v_ci);
9426  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_ci);
9427  __pyx_t_1 = PyObject_GetItem(__pyx_v_c, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
9428  __Pyx_GOTREF(__pyx_t_1);
9429  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9430  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error)
9431  __Pyx_GOTREF(__pyx_t_9);
9432  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9433  __pyx_t_1 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
9434  __Pyx_GOTREF(__pyx_t_1);
9435  __pyx_t_16 = PyNumber_Multiply(__pyx_t_1, __pyx_v_i); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 550, __pyx_L1_error)
9436  __Pyx_GOTREF(__pyx_t_16);
9437  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9438  __pyx_t_1 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
9439  __Pyx_GOTREF(__pyx_t_1);
9440  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 550, __pyx_L1_error)
9441  __Pyx_GOTREF(__pyx_t_7);
9442  __pyx_t_15 = PyNumber_Multiply(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 550, __pyx_L1_error)
9443  __Pyx_GOTREF(__pyx_t_15);
9444  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9445  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9446  if (__Pyx_PyObject_SetSlice(__pyx_t_9, __pyx_t_8, 0, 0, &__pyx_t_16, &__pyx_t_15, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 550, __pyx_L1_error)
9447  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9448  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9449  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9450  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9451 
9452  /* "ADR.pyx":548
9453  * c[('df',ci,ci)].flat[:] = 0.0
9454  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
9455  * for i in range(len(c[('u',ci)].flat)): # <<<<<<<<<<<<<<
9456  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9457  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9458  */
9459  }
9460  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9461 
9462  /* "ADR.pyx":547
9463  * else:
9464  * c[('df',ci,ci)].flat[:] = 0.0
9465  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)): # <<<<<<<<<<<<<<
9466  * for i in range(len(c[('u',ci)].flat)):
9467  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9468  */
9469  }
9470 
9471  /* "ADR.pyx":541
9472  * nd = self.nd
9473  * for c in [cebqe]:
9474  * for ci in range(self.nc): # <<<<<<<<<<<<<<
9475  * if c.has_key(('df',ci,ci)):
9476  * if self.velocity is not None:
9477  */
9478  }
9479  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9480 
9481  /* "ADR.pyx":540
9482  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
9483  * nd = self.nd
9484  * for c in [cebqe]: # <<<<<<<<<<<<<<
9485  * for ci in range(self.nc):
9486  * if c.has_key(('df',ci,ci)):
9487  */
9488  }
9489  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9490 
9491  /* "ADR.pyx":538
9492  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9493  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9494  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe): # <<<<<<<<<<<<<<
9495  * nd = self.nd
9496  * for c in [cebqe]:
9497  */
9498 
9499  /* function exit code */
9500  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9501  goto __pyx_L0;
9502  __pyx_L1_error:;
9503  __Pyx_XDECREF(__pyx_t_1);
9504  __Pyx_XDECREF(__pyx_t_2);
9505  __Pyx_XDECREF(__pyx_t_4);
9506  __Pyx_XDECREF(__pyx_t_7);
9507  __Pyx_XDECREF(__pyx_t_8);
9508  __Pyx_XDECREF(__pyx_t_9);
9509  __Pyx_XDECREF(__pyx_t_10);
9510  __Pyx_XDECREF(__pyx_t_15);
9511  __Pyx_XDECREF(__pyx_t_16);
9512  __Pyx_AddTraceback("ADR.Coefficients.initializeGlobalExteriorElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
9513  __pyx_r = NULL;
9514  __pyx_L0:;
9515  __Pyx_XDECREF(__pyx_v_nd);
9516  __Pyx_XDECREF(__pyx_v_c);
9517  __Pyx_XDECREF(__pyx_v_ci);
9518  __Pyx_XDECREF(__pyx_v_i);
9519  __Pyx_XGIVEREF(__pyx_r);
9520  __Pyx_RefNannyFinishContext();
9521  return __pyx_r;
9522 }
9523 
9524 /* "ADR.pyx":551
9525  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9526  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9527  * def evaluate(self,t,c): # <<<<<<<<<<<<<<
9528  * if self.timeVaryingCoefficients:
9529  * nd = self.nd
9530  */
9531 
9532 /* Python wrapper */
9533 static PyObject *__pyx_pw_3ADR_12Coefficients_9evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9534 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_9evaluate = {"evaluate", (PyCFunction)__pyx_pw_3ADR_12Coefficients_9evaluate, METH_VARARGS|METH_KEYWORDS, 0};
9535 static PyObject *__pyx_pw_3ADR_12Coefficients_9evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9536  PyObject *__pyx_v_self = 0;
9537  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
9538  PyObject *__pyx_v_c = 0;
9539  PyObject *__pyx_r = 0;
9540  __Pyx_RefNannyDeclarations
9541  __Pyx_RefNannySetupContext("evaluate (wrapper)", 0);
9542  {
9543  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,&__pyx_n_s_c,0};
9544  PyObject* values[3] = {0,0,0};
9545  if (unlikely(__pyx_kwds)) {
9546  Py_ssize_t kw_args;
9547  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9548  switch (pos_args) {
9549  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9550  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9551  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9552  case 0: break;
9553  default: goto __pyx_L5_argtuple_error;
9554  }
9555  kw_args = PyDict_Size(__pyx_kwds);
9556  switch (pos_args) {
9557  case 0:
9558  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
9559  else goto __pyx_L5_argtuple_error;
9560  case 1:
9561  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
9562  else {
9563  __Pyx_RaiseArgtupleInvalid("evaluate", 1, 3, 3, 1); __PYX_ERR(0, 551, __pyx_L3_error)
9564  }
9565  case 2:
9566  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
9567  else {
9568  __Pyx_RaiseArgtupleInvalid("evaluate", 1, 3, 3, 2); __PYX_ERR(0, 551, __pyx_L3_error)
9569  }
9570  }
9571  if (unlikely(kw_args > 0)) {
9572  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "evaluate") < 0)) __PYX_ERR(0, 551, __pyx_L3_error)
9573  }
9574  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
9575  goto __pyx_L5_argtuple_error;
9576  } else {
9577  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9578  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9579  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9580  }
9581  __pyx_v_self = values[0];
9582  __pyx_v_t = values[1];
9583  __pyx_v_c = values[2];
9584  }
9585  goto __pyx_L4_argument_unpacking_done;
9586  __pyx_L5_argtuple_error:;
9587  __Pyx_RaiseArgtupleInvalid("evaluate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 551, __pyx_L3_error)
9588  __pyx_L3_error:;
9589  __Pyx_AddTraceback("ADR.Coefficients.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
9590  __Pyx_RefNannyFinishContext();
9591  return NULL;
9592  __pyx_L4_argument_unpacking_done:;
9593  __pyx_r = __pyx_pf_3ADR_12Coefficients_8evaluate(__pyx_self, __pyx_v_self, __pyx_v_t, __pyx_v_c);
9594 
9595  /* function exit code */
9596  __Pyx_RefNannyFinishContext();
9597  return __pyx_r;
9598 }
9599 
9600 static PyObject *__pyx_pf_3ADR_12Coefficients_8evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_c) {
9601  PyObject *__pyx_v_nd = NULL;
9602  PyObject *__pyx_v_ci = NULL;
9603  PyObject *__pyx_v_i = NULL;
9604  PyObject *__pyx_r = NULL;
9605  __Pyx_RefNannyDeclarations
9606  PyObject *__pyx_t_1 = NULL;
9607  int __pyx_t_2;
9608  PyObject *__pyx_t_3 = NULL;
9609  Py_ssize_t __pyx_t_4;
9610  PyObject *(*__pyx_t_5)(PyObject *);
9611  int __pyx_t_6;
9612  PyObject *__pyx_t_7 = NULL;
9613  PyObject *__pyx_t_8 = NULL;
9614  Py_ssize_t __pyx_t_9;
9615  PyObject *(*__pyx_t_10)(PyObject *);
9616  PyObject *__pyx_t_11 = NULL;
9617  PyObject *__pyx_t_12 = NULL;
9618  PyObject *__pyx_t_13 = NULL;
9619  PyObject *__pyx_t_14 = NULL;
9620  __Pyx_RefNannySetupContext("evaluate", 0);
9621 
9622  /* "ADR.pyx":552
9623  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9624  * def evaluate(self,t,c):
9625  * if self.timeVaryingCoefficients: # <<<<<<<<<<<<<<
9626  * nd = self.nd
9627  * for ci in range(self.nc):
9628  */
9629  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeVaryingCoefficients); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
9630  __Pyx_GOTREF(__pyx_t_1);
9631  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 552, __pyx_L1_error)
9632  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9633  if (__pyx_t_2) {
9634 
9635  /* "ADR.pyx":553
9636  * def evaluate(self,t,c):
9637  * if self.timeVaryingCoefficients:
9638  * nd = self.nd # <<<<<<<<<<<<<<
9639  * for ci in range(self.nc):
9640  * if self.velocity is not None:
9641  */
9642  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
9643  __Pyx_GOTREF(__pyx_t_1);
9644  __pyx_v_nd = __pyx_t_1;
9645  __pyx_t_1 = 0;
9646 
9647  /* "ADR.pyx":554
9648  * if self.timeVaryingCoefficients:
9649  * nd = self.nd
9650  * for ci in range(self.nc): # <<<<<<<<<<<<<<
9651  * if self.velocity is not None:
9652  * c[('df',ci,ci)][...,:] = self.velocity
9653  */
9654  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
9655  __Pyx_GOTREF(__pyx_t_1);
9656  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error)
9657  __Pyx_GOTREF(__pyx_t_3);
9658  __Pyx_GIVEREF(__pyx_t_1);
9659  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
9660  __pyx_t_1 = 0;
9661  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
9662  __Pyx_GOTREF(__pyx_t_1);
9663  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9664  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
9665  __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
9666  __pyx_t_5 = NULL;
9667  } else {
9668  __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error)
9669  __Pyx_GOTREF(__pyx_t_3);
9670  __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 554, __pyx_L1_error)
9671  }
9672  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9673  for (;;) {
9674  if (likely(!__pyx_t_5)) {
9675  if (likely(PyList_CheckExact(__pyx_t_3))) {
9676  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
9677  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9678  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 554, __pyx_L1_error)
9679  #else
9680  __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
9681  __Pyx_GOTREF(__pyx_t_1);
9682  #endif
9683  } else {
9684  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
9685  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9686  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 554, __pyx_L1_error)
9687  #else
9688  __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
9689  __Pyx_GOTREF(__pyx_t_1);
9690  #endif
9691  }
9692  } else {
9693  __pyx_t_1 = __pyx_t_5(__pyx_t_3);
9694  if (unlikely(!__pyx_t_1)) {
9695  PyObject* exc_type = PyErr_Occurred();
9696  if (exc_type) {
9697  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9698  else __PYX_ERR(0, 554, __pyx_L1_error)
9699  }
9700  break;
9701  }
9702  __Pyx_GOTREF(__pyx_t_1);
9703  }
9704  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
9705  __pyx_t_1 = 0;
9706 
9707  /* "ADR.pyx":555
9708  * nd = self.nd
9709  * for ci in range(self.nc):
9710  * if self.velocity is not None: # <<<<<<<<<<<<<<
9711  * c[('df',ci,ci)][...,:] = self.velocity
9712  * else:
9713  */
9714  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
9715  __Pyx_GOTREF(__pyx_t_1);
9716  __pyx_t_2 = (__pyx_t_1 != Py_None);
9717  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9718  __pyx_t_6 = (__pyx_t_2 != 0);
9719  if (__pyx_t_6) {
9720 
9721  /* "ADR.pyx":556
9722  * for ci in range(self.nc):
9723  * if self.velocity is not None:
9724  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
9725  * else:
9726  * c[('df',ci,ci)].flat[:] = 0.0
9727  */
9728  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
9729  __Pyx_GOTREF(__pyx_t_1);
9730  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 556, __pyx_L1_error)
9731  __Pyx_GOTREF(__pyx_t_7);
9732  __Pyx_INCREF(__pyx_n_s_df);
9733  __Pyx_GIVEREF(__pyx_n_s_df);
9734  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_df);
9735  __Pyx_INCREF(__pyx_v_ci);
9736  __Pyx_GIVEREF(__pyx_v_ci);
9737  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
9738  __Pyx_INCREF(__pyx_v_ci);
9739  __Pyx_GIVEREF(__pyx_v_ci);
9740  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
9741  __pyx_t_8 = PyObject_GetItem(__pyx_v_c, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 556, __pyx_L1_error)
9742  __Pyx_GOTREF(__pyx_t_8);
9743  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9744  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_tuple__15, __pyx_t_1) < 0)) __PYX_ERR(0, 556, __pyx_L1_error)
9745  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9746  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9747 
9748  /* "ADR.pyx":555
9749  * nd = self.nd
9750  * for ci in range(self.nc):
9751  * if self.velocity is not None: # <<<<<<<<<<<<<<
9752  * c[('df',ci,ci)][...,:] = self.velocity
9753  * else:
9754  */
9755  goto __pyx_L6;
9756  }
9757 
9758  /* "ADR.pyx":558
9759  * c[('df',ci,ci)][...,:] = self.velocity
9760  * else:
9761  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
9762  * for i in range(len(c[('r',ci)].flat)):
9763  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9764  */
9765  /*else*/ {
9766  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
9767  __Pyx_GOTREF(__pyx_t_1);
9768  __Pyx_INCREF(__pyx_n_s_df);
9769  __Pyx_GIVEREF(__pyx_n_s_df);
9770  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_df);
9771  __Pyx_INCREF(__pyx_v_ci);
9772  __Pyx_GIVEREF(__pyx_v_ci);
9773  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
9774  __Pyx_INCREF(__pyx_v_ci);
9775  __Pyx_GIVEREF(__pyx_v_ci);
9776  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_ci);
9777  __pyx_t_8 = PyObject_GetItem(__pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 558, __pyx_L1_error)
9778  __Pyx_GOTREF(__pyx_t_8);
9779  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9780  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
9781  __Pyx_GOTREF(__pyx_t_1);
9782  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9783  if (__Pyx_PyObject_SetSlice(__pyx_t_1, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__16, 0, 0, 1) < 0) __PYX_ERR(0, 558, __pyx_L1_error)
9784  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9785  }
9786  __pyx_L6:;
9787 
9788  /* "ADR.pyx":559
9789  * else:
9790  * c[('df',ci,ci)].flat[:] = 0.0
9791  * for i in range(len(c[('r',ci)].flat)): # <<<<<<<<<<<<<<
9792  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9793  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9794  */
9795  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
9796  __Pyx_GOTREF(__pyx_t_1);
9797  __Pyx_INCREF(__pyx_n_s_r);
9798  __Pyx_GIVEREF(__pyx_n_s_r);
9799  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_r);
9800  __Pyx_INCREF(__pyx_v_ci);
9801  __Pyx_GIVEREF(__pyx_v_ci);
9802  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
9803  __pyx_t_8 = PyObject_GetItem(__pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 559, __pyx_L1_error)
9804  __Pyx_GOTREF(__pyx_t_8);
9805  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9806  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
9807  __Pyx_GOTREF(__pyx_t_1);
9808  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9809  __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 559, __pyx_L1_error)
9810  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9811  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
9812  __Pyx_GOTREF(__pyx_t_1);
9813  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 559, __pyx_L1_error)
9814  __Pyx_GOTREF(__pyx_t_8);
9815  __Pyx_GIVEREF(__pyx_t_1);
9816  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
9817  __pyx_t_1 = 0;
9818  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
9819  __Pyx_GOTREF(__pyx_t_1);
9820  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9821  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
9822  __pyx_t_8 = __pyx_t_1; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0;
9823  __pyx_t_10 = NULL;
9824  } else {
9825  __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 559, __pyx_L1_error)
9826  __Pyx_GOTREF(__pyx_t_8);
9827  __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 559, __pyx_L1_error)
9828  }
9829  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9830  for (;;) {
9831  if (likely(!__pyx_t_10)) {
9832  if (likely(PyList_CheckExact(__pyx_t_8))) {
9833  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break;
9834  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9835  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 559, __pyx_L1_error)
9836  #else
9837  __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
9838  __Pyx_GOTREF(__pyx_t_1);
9839  #endif
9840  } else {
9841  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
9842  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9843  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 559, __pyx_L1_error)
9844  #else
9845  __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
9846  __Pyx_GOTREF(__pyx_t_1);
9847  #endif
9848  }
9849  } else {
9850  __pyx_t_1 = __pyx_t_10(__pyx_t_8);
9851  if (unlikely(!__pyx_t_1)) {
9852  PyObject* exc_type = PyErr_Occurred();
9853  if (exc_type) {
9854  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9855  else __PYX_ERR(0, 559, __pyx_L1_error)
9856  }
9857  break;
9858  }
9859  __Pyx_GOTREF(__pyx_t_1);
9860  }
9861  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
9862  __pyx_t_1 = 0;
9863 
9864  /* "ADR.pyx":560
9865  * c[('df',ci,ci)].flat[:] = 0.0
9866  * for i in range(len(c[('r',ci)].flat)):
9867  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)]) # <<<<<<<<<<<<<<
9868  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9869  *
9870  */
9871  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fOfX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 560, __pyx_L1_error)
9872  __Pyx_GOTREF(__pyx_t_7);
9873  __pyx_t_11 = PyObject_GetItem(__pyx_t_7, __pyx_v_ci); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 560, __pyx_L1_error)
9874  __Pyx_GOTREF(__pyx_t_11);
9875  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9876  __pyx_t_7 = PyObject_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 560, __pyx_L1_error)
9877  __Pyx_GOTREF(__pyx_t_7);
9878  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 560, __pyx_L1_error)
9879  __Pyx_GOTREF(__pyx_t_12);
9880  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9881  __pyx_t_7 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 560, __pyx_L1_error)
9882  __Pyx_GOTREF(__pyx_t_7);
9883  __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 560, __pyx_L1_error)
9884  __Pyx_GOTREF(__pyx_t_13);
9885  __pyx_t_14 = PyNumber_Multiply(__pyx_int_3, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 560, __pyx_L1_error)
9886  __Pyx_GOTREF(__pyx_t_14);
9887  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9888  __pyx_t_13 = __Pyx_PyObject_GetSlice(__pyx_t_12, 0, 0, &__pyx_t_7, &__pyx_t_14, NULL, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 560, __pyx_L1_error)
9889  __Pyx_GOTREF(__pyx_t_13);
9890  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9891  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9892  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9893  __pyx_t_14 = NULL;
9894  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
9895  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11);
9896  if (likely(__pyx_t_14)) {
9897  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
9898  __Pyx_INCREF(__pyx_t_14);
9899  __Pyx_INCREF(function);
9900  __Pyx_DECREF_SET(__pyx_t_11, function);
9901  }
9902  }
9903  if (!__pyx_t_14) {
9904  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
9905  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9906  __Pyx_GOTREF(__pyx_t_1);
9907  } else {
9908  #if CYTHON_FAST_PYCALL
9909  if (PyFunction_Check(__pyx_t_11)) {
9910  PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_13};
9911  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
9912  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
9913  __Pyx_GOTREF(__pyx_t_1);
9914  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9915  } else
9916  #endif
9917  #if CYTHON_FAST_PYCCALL
9918  if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
9919  PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_13};
9920  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
9921  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
9922  __Pyx_GOTREF(__pyx_t_1);
9923  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9924  } else
9925  #endif
9926  {
9927  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 560, __pyx_L1_error)
9928  __Pyx_GOTREF(__pyx_t_7);
9929  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14); __pyx_t_14 = NULL;
9930  __Pyx_GIVEREF(__pyx_t_13);
9931  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_13);
9932  __pyx_t_13 = 0;
9933  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
9934  __Pyx_GOTREF(__pyx_t_1);
9935  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9936  }
9937  }
9938  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
9939  __pyx_t_11 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 560, __pyx_L1_error)
9940  __Pyx_GOTREF(__pyx_t_11);
9941  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9942  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
9943  __Pyx_GOTREF(__pyx_t_1);
9944  __Pyx_INCREF(__pyx_n_s_r);
9945  __Pyx_GIVEREF(__pyx_n_s_r);
9946  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_r);
9947  __Pyx_INCREF(__pyx_v_ci);
9948  __Pyx_GIVEREF(__pyx_v_ci);
9949  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
9950  __pyx_t_7 = PyObject_GetItem(__pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 560, __pyx_L1_error)
9951  __Pyx_GOTREF(__pyx_t_7);
9952  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9953  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
9954  __Pyx_GOTREF(__pyx_t_1);
9955  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9956  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_i, __pyx_t_11) < 0)) __PYX_ERR(0, 560, __pyx_L1_error)
9957  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9958  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
9959 
9960  /* "ADR.pyx":561
9961  * for i in range(len(c[('r',ci)].flat)):
9962  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9963  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat # <<<<<<<<<<<<<<
9964  *
9965  * class LevelModel(proteus.Transport.OneLevelTransport):
9966  */
9967  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aOfX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
9968  __Pyx_GOTREF(__pyx_t_1);
9969  __pyx_t_7 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 561, __pyx_L1_error)
9970  __Pyx_GOTREF(__pyx_t_7);
9971  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9972  __pyx_t_1 = PyObject_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
9973  __Pyx_GOTREF(__pyx_t_1);
9974  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 561, __pyx_L1_error)
9975  __Pyx_GOTREF(__pyx_t_13);
9976  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9977  __pyx_t_1 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
9978  __Pyx_GOTREF(__pyx_t_1);
9979  __pyx_t_14 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 561, __pyx_L1_error)
9980  __Pyx_GOTREF(__pyx_t_14);
9981  __pyx_t_12 = PyNumber_Multiply(__pyx_int_3, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 561, __pyx_L1_error)
9982  __Pyx_GOTREF(__pyx_t_12);
9983  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9984  __pyx_t_14 = __Pyx_PyObject_GetSlice(__pyx_t_13, 0, 0, &__pyx_t_1, &__pyx_t_12, NULL, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 561, __pyx_L1_error)
9985  __Pyx_GOTREF(__pyx_t_14);
9986  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9987  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9988  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9989  __pyx_t_12 = NULL;
9990  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
9991  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
9992  if (likely(__pyx_t_12)) {
9993  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
9994  __Pyx_INCREF(__pyx_t_12);
9995  __Pyx_INCREF(function);
9996  __Pyx_DECREF_SET(__pyx_t_7, function);
9997  }
9998  }
9999  if (!__pyx_t_12) {
10000  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 561, __pyx_L1_error)
10001  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10002  __Pyx_GOTREF(__pyx_t_11);
10003  } else {
10004  #if CYTHON_FAST_PYCALL
10005  if (PyFunction_Check(__pyx_t_7)) {
10006  PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_14};
10007  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 561, __pyx_L1_error)
10008  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
10009  __Pyx_GOTREF(__pyx_t_11);
10010  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10011  } else
10012  #endif
10013  #if CYTHON_FAST_PYCCALL
10014  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
10015  PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_14};
10016  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 561, __pyx_L1_error)
10017  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
10018  __Pyx_GOTREF(__pyx_t_11);
10019  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10020  } else
10021  #endif
10022  {
10023  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
10024  __Pyx_GOTREF(__pyx_t_1);
10025  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_12); __pyx_t_12 = NULL;
10026  __Pyx_GIVEREF(__pyx_t_14);
10027  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_14);
10028  __pyx_t_14 = 0;
10029  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 561, __pyx_L1_error)
10030  __Pyx_GOTREF(__pyx_t_11);
10031  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10032  }
10033  }
10034  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10035  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_flat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 561, __pyx_L1_error)
10036  __Pyx_GOTREF(__pyx_t_7);
10037  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
10038  __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 561, __pyx_L1_error)
10039  __Pyx_GOTREF(__pyx_t_11);
10040  __Pyx_INCREF(__pyx_n_s_a);
10041  __Pyx_GIVEREF(__pyx_n_s_a);
10042  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_a);
10043  __Pyx_INCREF(__pyx_v_ci);
10044  __Pyx_GIVEREF(__pyx_v_ci);
10045  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ci);
10046  __Pyx_INCREF(__pyx_v_ci);
10047  __Pyx_GIVEREF(__pyx_v_ci);
10048  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_ci);
10049  __pyx_t_1 = PyObject_GetItem(__pyx_v_c, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
10050  __Pyx_GOTREF(__pyx_t_1);
10051  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
10052  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 561, __pyx_L1_error)
10053  __Pyx_GOTREF(__pyx_t_11);
10054  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10055  __pyx_t_1 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
10056  __Pyx_GOTREF(__pyx_t_1);
10057  __pyx_t_14 = PyNumber_Multiply(__pyx_t_1, __pyx_v_i); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 561, __pyx_L1_error)
10058  __Pyx_GOTREF(__pyx_t_14);
10059  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10060  __pyx_t_1 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
10061  __Pyx_GOTREF(__pyx_t_1);
10062  __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 561, __pyx_L1_error)
10063  __Pyx_GOTREF(__pyx_t_12);
10064  __pyx_t_13 = PyNumber_Multiply(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 561, __pyx_L1_error)
10065  __Pyx_GOTREF(__pyx_t_13);
10066  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10067  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10068  if (__Pyx_PyObject_SetSlice(__pyx_t_11, __pyx_t_7, 0, 0, &__pyx_t_14, &__pyx_t_13, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 561, __pyx_L1_error)
10069  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
10070  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10071  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10072  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10073 
10074  /* "ADR.pyx":559
10075  * else:
10076  * c[('df',ci,ci)].flat[:] = 0.0
10077  * for i in range(len(c[('r',ci)].flat)): # <<<<<<<<<<<<<<
10078  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
10079  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
10080  */
10081  }
10082  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10083 
10084  /* "ADR.pyx":554
10085  * if self.timeVaryingCoefficients:
10086  * nd = self.nd
10087  * for ci in range(self.nc): # <<<<<<<<<<<<<<
10088  * if self.velocity is not None:
10089  * c[('df',ci,ci)][...,:] = self.velocity
10090  */
10091  }
10092  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10093 
10094  /* "ADR.pyx":552
10095  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
10096  * def evaluate(self,t,c):
10097  * if self.timeVaryingCoefficients: # <<<<<<<<<<<<<<
10098  * nd = self.nd
10099  * for ci in range(self.nc):
10100  */
10101  }
10102 
10103  /* "ADR.pyx":551
10104  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
10105  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
10106  * def evaluate(self,t,c): # <<<<<<<<<<<<<<
10107  * if self.timeVaryingCoefficients:
10108  * nd = self.nd
10109  */
10110 
10111  /* function exit code */
10112  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10113  goto __pyx_L0;
10114  __pyx_L1_error:;
10115  __Pyx_XDECREF(__pyx_t_1);
10116  __Pyx_XDECREF(__pyx_t_3);
10117  __Pyx_XDECREF(__pyx_t_7);
10118  __Pyx_XDECREF(__pyx_t_8);
10119  __Pyx_XDECREF(__pyx_t_11);
10120  __Pyx_XDECREF(__pyx_t_12);
10121  __Pyx_XDECREF(__pyx_t_13);
10122  __Pyx_XDECREF(__pyx_t_14);
10123  __Pyx_AddTraceback("ADR.Coefficients.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
10124  __pyx_r = NULL;
10125  __pyx_L0:;
10126  __Pyx_XDECREF(__pyx_v_nd);
10127  __Pyx_XDECREF(__pyx_v_ci);
10128  __Pyx_XDECREF(__pyx_v_i);
10129  __Pyx_XGIVEREF(__pyx_r);
10130  __Pyx_RefNannyFinishContext();
10131  return __pyx_r;
10132 }
10133 
10134 /* "ADR.pyx":571
10135  * """
10136  * nCalls=0
10137  * def __init__(self, # <<<<<<<<<<<<<<
10138  * uDict,
10139  * phiDict,
10140  */
10141 
10142 /* Python wrapper */
10143 static PyObject *__pyx_pw_3ADR_10LevelModel_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10144 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_10LevelModel_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
10145 static PyObject *__pyx_pw_3ADR_10LevelModel_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10146  PyObject *__pyx_v_self = 0;
10147  PyObject *__pyx_v_uDict = 0;
10148  PyObject *__pyx_v_phiDict = 0;
10149  PyObject *__pyx_v_testSpaceDict = 0;
10150  PyObject *__pyx_v_matType = 0;
10151  PyObject *__pyx_v_dofBoundaryConditionsDict = 0;
10152  PyObject *__pyx_v_dofBoundaryConditionsSetterDict = 0;
10153  PyObject *__pyx_v_coefficients = 0;
10154  PyObject *__pyx_v_elementQuadrature = 0;
10155  PyObject *__pyx_v_elementBoundaryQuadrature = 0;
10156  PyObject *__pyx_v_fluxBoundaryConditionsDict = 0;
10157  PyObject *__pyx_v_advectiveFluxBoundaryConditionsSetterDict = 0;
10158  PyObject *__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict = 0;
10159  CYTHON_UNUSED PyObject *__pyx_v_stressTraceBoundaryConditionsSetterDict = 0;
10160  PyObject *__pyx_v_stabilization = 0;
10161  PyObject *__pyx_v_shockCapturing = 0;
10162  PyObject *__pyx_v_conservativeFluxDict = 0;
10163  PyObject *__pyx_v_numericalFluxType = 0;
10164  PyObject *__pyx_v_TimeIntegrationClass = 0;
10165  PyObject *__pyx_v_massLumping = 0;
10166  PyObject *__pyx_v_reactionLumping = 0;
10167  PyObject *__pyx_v_options = 0;
10168  PyObject *__pyx_v_name = 0;
10169  PyObject *__pyx_v_reuse_trial_and_test_quadrature = 0;
10170  PyObject *__pyx_v_sd = 0;
10171  PyObject *__pyx_v_movingDomain = 0;
10172  PyObject *__pyx_r = 0;
10173  __Pyx_RefNannyDeclarations
10174  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
10175  {
10176  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_uDict,&__pyx_n_s_phiDict,&__pyx_n_s_testSpaceDict,&__pyx_n_s_matType,&__pyx_n_s_dofBoundaryConditionsDict,&__pyx_n_s_dofBoundaryConditionsSetterDict,&__pyx_n_s_coefficients,&__pyx_n_s_elementQuadrature,&__pyx_n_s_elementBoundaryQuadrature,&__pyx_n_s_fluxBoundaryConditionsDict,&__pyx_n_s_advectiveFluxBoundaryConditionsS,&__pyx_n_s_diffusiveFluxBoundaryConditionsS,&__pyx_n_s_stressTraceBoundaryConditionsSet,&__pyx_n_s_stabilization,&__pyx_n_s_shockCapturing,&__pyx_n_s_conservativeFluxDict,&__pyx_n_s_numericalFluxType,&__pyx_n_s_TimeIntegrationClass,&__pyx_n_s_massLumping,&__pyx_n_s_reactionLumping,&__pyx_n_s_options,&__pyx_n_s_name,&__pyx_n_s_reuse_trial_and_test_quadrature,&__pyx_n_s_sd,&__pyx_n_s_movingDomain,0};
10177  PyObject* values[26] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
10178 
10179  /* "ADR.pyx":581
10180  * elementQuadrature,
10181  * elementBoundaryQuadrature,
10182  * fluxBoundaryConditionsDict=None, # <<<<<<<<<<<<<<
10183  * advectiveFluxBoundaryConditionsSetterDict=None,
10184  * diffusiveFluxBoundaryConditionsSetterDictDict=None,
10185  */
10186  values[10] = ((PyObject *)((PyObject *)Py_None));
10187 
10188  /* "ADR.pyx":582
10189  * elementBoundaryQuadrature,
10190  * fluxBoundaryConditionsDict=None,
10191  * advectiveFluxBoundaryConditionsSetterDict=None, # <<<<<<<<<<<<<<
10192  * diffusiveFluxBoundaryConditionsSetterDictDict=None,
10193  * stressTraceBoundaryConditionsSetterDict=None,
10194  */
10195  values[11] = ((PyObject *)((PyObject *)Py_None));
10196 
10197  /* "ADR.pyx":583
10198  * fluxBoundaryConditionsDict=None,
10199  * advectiveFluxBoundaryConditionsSetterDict=None,
10200  * diffusiveFluxBoundaryConditionsSetterDictDict=None, # <<<<<<<<<<<<<<
10201  * stressTraceBoundaryConditionsSetterDict=None,
10202  * stabilization=None,
10203  */
10204  values[12] = ((PyObject *)((PyObject *)Py_None));
10205 
10206  /* "ADR.pyx":584
10207  * advectiveFluxBoundaryConditionsSetterDict=None,
10208  * diffusiveFluxBoundaryConditionsSetterDictDict=None,
10209  * stressTraceBoundaryConditionsSetterDict=None, # <<<<<<<<<<<<<<
10210  * stabilization=None,
10211  * shockCapturing=None,
10212  */
10213  values[13] = ((PyObject *)((PyObject *)Py_None));
10214 
10215  /* "ADR.pyx":585
10216  * diffusiveFluxBoundaryConditionsSetterDictDict=None,
10217  * stressTraceBoundaryConditionsSetterDict=None,
10218  * stabilization=None, # <<<<<<<<<<<<<<
10219  * shockCapturing=None,
10220  * conservativeFluxDict=None,
10221  */
10222  values[14] = ((PyObject *)((PyObject *)Py_None));
10223 
10224  /* "ADR.pyx":586
10225  * stressTraceBoundaryConditionsSetterDict=None,
10226  * stabilization=None,
10227  * shockCapturing=None, # <<<<<<<<<<<<<<
10228  * conservativeFluxDict=None,
10229  * numericalFluxType=None,
10230  */
10231  values[15] = ((PyObject *)((PyObject *)Py_None));
10232 
10233  /* "ADR.pyx":587
10234  * stabilization=None,
10235  * shockCapturing=None,
10236  * conservativeFluxDict=None, # <<<<<<<<<<<<<<
10237  * numericalFluxType=None,
10238  * TimeIntegrationClass=None,
10239  */
10240  values[16] = ((PyObject *)((PyObject *)Py_None));
10241 
10242  /* "ADR.pyx":588
10243  * shockCapturing=None,
10244  * conservativeFluxDict=None,
10245  * numericalFluxType=None, # <<<<<<<<<<<<<<
10246  * TimeIntegrationClass=None,
10247  * massLumping=False,
10248  */
10249  values[17] = ((PyObject *)((PyObject *)Py_None));
10250 
10251  /* "ADR.pyx":589
10252  * conservativeFluxDict=None,
10253  * numericalFluxType=None,
10254  * TimeIntegrationClass=None, # <<<<<<<<<<<<<<
10255  * massLumping=False,
10256  * reactionLumping=False,
10257  */
10258  values[18] = ((PyObject *)((PyObject *)Py_None));
10259 
10260  /* "ADR.pyx":590
10261  * numericalFluxType=None,
10262  * TimeIntegrationClass=None,
10263  * massLumping=False, # <<<<<<<<<<<<<<
10264  * reactionLumping=False,
10265  * options=None,
10266  */
10267  values[19] = ((PyObject *)((PyObject *)Py_False));
10268 
10269  /* "ADR.pyx":591
10270  * TimeIntegrationClass=None,
10271  * massLumping=False,
10272  * reactionLumping=False, # <<<<<<<<<<<<<<
10273  * options=None,
10274  * name='defaultName',
10275  */
10276  values[20] = ((PyObject *)((PyObject *)Py_False));
10277 
10278  /* "ADR.pyx":592
10279  * massLumping=False,
10280  * reactionLumping=False,
10281  * options=None, # <<<<<<<<<<<<<<
10282  * name='defaultName',
10283  * reuse_trial_and_test_quadrature=True,
10284  */
10285  values[21] = ((PyObject *)((PyObject *)Py_None));
10286  values[22] = ((PyObject *)((PyObject*)__pyx_n_s_defaultName));
10287 
10288  /* "ADR.pyx":594
10289  * options=None,
10290  * name='defaultName',
10291  * reuse_trial_and_test_quadrature=True, # <<<<<<<<<<<<<<
10292  * sd = True,
10293  * movingDomain=False):#,
10294  */
10295  values[23] = ((PyObject *)((PyObject *)Py_True));
10296 
10297  /* "ADR.pyx":595
10298  * name='defaultName',
10299  * reuse_trial_and_test_quadrature=True,
10300  * sd = True, # <<<<<<<<<<<<<<
10301  * movingDomain=False):#,
10302  * from proteus import Comm
10303  */
10304  values[24] = ((PyObject *)((PyObject *)Py_True));
10305 
10306  /* "ADR.pyx":596
10307  * reuse_trial_and_test_quadrature=True,
10308  * sd = True,
10309  * movingDomain=False):#, # <<<<<<<<<<<<<<
10310  * from proteus import Comm
10311  * #
10312  */
10313  values[25] = ((PyObject *)((PyObject *)Py_False));
10314  if (unlikely(__pyx_kwds)) {
10315  Py_ssize_t kw_args;
10316  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10317  switch (pos_args) {
10318  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
10319  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
10320  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
10321  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
10322  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
10323  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
10324  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
10325  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
10326  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
10327  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
10328  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
10329  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
10330  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
10331  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
10332  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
10333  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
10334  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
10335  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
10336  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
10337  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
10338  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10339  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10340  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10341  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10342  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10343  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10344  case 0: break;
10345  default: goto __pyx_L5_argtuple_error;
10346  }
10347  kw_args = PyDict_Size(__pyx_kwds);
10348  switch (pos_args) {
10349  case 0:
10350  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
10351  else goto __pyx_L5_argtuple_error;
10352  case 1:
10353  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uDict)) != 0)) kw_args--;
10354  else {
10355  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 1); __PYX_ERR(0, 571, __pyx_L3_error)
10356  }
10357  case 2:
10358  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_phiDict)) != 0)) kw_args--;
10359  else {
10360  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 2); __PYX_ERR(0, 571, __pyx_L3_error)
10361  }
10362  case 3:
10363  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_testSpaceDict)) != 0)) kw_args--;
10364  else {
10365  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 3); __PYX_ERR(0, 571, __pyx_L3_error)
10366  }
10367  case 4:
10368  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
10369  else {
10370  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 4); __PYX_ERR(0, 571, __pyx_L3_error)
10371  }
10372  case 5:
10373  if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dofBoundaryConditionsDict)) != 0)) kw_args--;
10374  else {
10375  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 5); __PYX_ERR(0, 571, __pyx_L3_error)
10376  }
10377  case 6:
10378  if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dofBoundaryConditionsSetterDict)) != 0)) kw_args--;
10379  else {
10380  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 6); __PYX_ERR(0, 571, __pyx_L3_error)
10381  }
10382  case 7:
10383  if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
10384  else {
10385  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 7); __PYX_ERR(0, 571, __pyx_L3_error)
10386  }
10387  case 8:
10388  if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementQuadrature)) != 0)) kw_args--;
10389  else {
10390  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 8); __PYX_ERR(0, 571, __pyx_L3_error)
10391  }
10392  case 9:
10393  if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementBoundaryQuadrature)) != 0)) kw_args--;
10394  else {
10395  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 9); __PYX_ERR(0, 571, __pyx_L3_error)
10396  }
10397  case 10:
10398  if (kw_args > 0) {
10399  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fluxBoundaryConditionsDict);
10400  if (value) { values[10] = value; kw_args--; }
10401  }
10402  case 11:
10403  if (kw_args > 0) {
10404  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_advectiveFluxBoundaryConditionsS);
10405  if (value) { values[11] = value; kw_args--; }
10406  }
10407  case 12:
10408  if (kw_args > 0) {
10409  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_diffusiveFluxBoundaryConditionsS);
10410  if (value) { values[12] = value; kw_args--; }
10411  }
10412  case 13:
10413  if (kw_args > 0) {
10414  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stressTraceBoundaryConditionsSet);
10415  if (value) { values[13] = value; kw_args--; }
10416  }
10417  case 14:
10418  if (kw_args > 0) {
10419  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stabilization);
10420  if (value) { values[14] = value; kw_args--; }
10421  }
10422  case 15:
10423  if (kw_args > 0) {
10424  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shockCapturing);
10425  if (value) { values[15] = value; kw_args--; }
10426  }
10427  case 16:
10428  if (kw_args > 0) {
10429  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conservativeFluxDict);
10430  if (value) { values[16] = value; kw_args--; }
10431  }
10432  case 17:
10433  if (kw_args > 0) {
10434  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_numericalFluxType);
10435  if (value) { values[17] = value; kw_args--; }
10436  }
10437  case 18:
10438  if (kw_args > 0) {
10439  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_TimeIntegrationClass);
10440  if (value) { values[18] = value; kw_args--; }
10441  }
10442  case 19:
10443  if (kw_args > 0) {
10444  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_massLumping);
10445  if (value) { values[19] = value; kw_args--; }
10446  }
10447  case 20:
10448  if (kw_args > 0) {
10449  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reactionLumping);
10450  if (value) { values[20] = value; kw_args--; }
10451  }
10452  case 21:
10453  if (kw_args > 0) {
10454  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_options);
10455  if (value) { values[21] = value; kw_args--; }
10456  }
10457  case 22:
10458  if (kw_args > 0) {
10459  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name);
10460  if (value) { values[22] = value; kw_args--; }
10461  }
10462  case 23:
10463  if (kw_args > 0) {
10464  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reuse_trial_and_test_quadrature);
10465  if (value) { values[23] = value; kw_args--; }
10466  }
10467  case 24:
10468  if (kw_args > 0) {
10469  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sd);
10470  if (value) { values[24] = value; kw_args--; }
10471  }
10472  case 25:
10473  if (kw_args > 0) {
10474  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_movingDomain);
10475  if (value) { values[25] = value; kw_args--; }
10476  }
10477  }
10478  if (unlikely(kw_args > 0)) {
10479  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 571, __pyx_L3_error)
10480  }
10481  } else {
10482  switch (PyTuple_GET_SIZE(__pyx_args)) {
10483  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
10484  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
10485  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
10486  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
10487  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
10488  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
10489  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
10490  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
10491  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
10492  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
10493  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
10494  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
10495  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
10496  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
10497  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
10498  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
10499  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
10500  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
10501  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
10502  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
10503  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10504  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10505  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10506  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10507  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10508  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10509  break;
10510  default: goto __pyx_L5_argtuple_error;
10511  }
10512  }
10513  __pyx_v_self = values[0];
10514  __pyx_v_uDict = values[1];
10515  __pyx_v_phiDict = values[2];
10516  __pyx_v_testSpaceDict = values[3];
10517  __pyx_v_matType = values[4];
10518  __pyx_v_dofBoundaryConditionsDict = values[5];
10519  __pyx_v_dofBoundaryConditionsSetterDict = values[6];
10520  __pyx_v_coefficients = values[7];
10521  __pyx_v_elementQuadrature = values[8];
10522  __pyx_v_elementBoundaryQuadrature = values[9];
10523  __pyx_v_fluxBoundaryConditionsDict = values[10];
10524  __pyx_v_advectiveFluxBoundaryConditionsSetterDict = values[11];
10525  __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict = values[12];
10526  __pyx_v_stressTraceBoundaryConditionsSetterDict = values[13];
10527  __pyx_v_stabilization = values[14];
10528  __pyx_v_shockCapturing = values[15];
10529  __pyx_v_conservativeFluxDict = values[16];
10530  __pyx_v_numericalFluxType = values[17];
10531  __pyx_v_TimeIntegrationClass = values[18];
10532  __pyx_v_massLumping = values[19];
10533  __pyx_v_reactionLumping = values[20];
10534  __pyx_v_options = values[21];
10535  __pyx_v_name = values[22];
10536  __pyx_v_reuse_trial_and_test_quadrature = values[23];
10537  __pyx_v_sd = values[24];
10538  __pyx_v_movingDomain = values[25];
10539  }
10540  goto __pyx_L4_argument_unpacking_done;
10541  __pyx_L5_argtuple_error:;
10542  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 571, __pyx_L3_error)
10543  __pyx_L3_error:;
10544  __Pyx_AddTraceback("ADR.LevelModel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10545  __Pyx_RefNannyFinishContext();
10546  return NULL;
10547  __pyx_L4_argument_unpacking_done:;
10548  __pyx_r = __pyx_pf_3ADR_10LevelModel___init__(__pyx_self, __pyx_v_self, __pyx_v_uDict, __pyx_v_phiDict, __pyx_v_testSpaceDict, __pyx_v_matType, __pyx_v_dofBoundaryConditionsDict, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_coefficients, __pyx_v_elementQuadrature, __pyx_v_elementBoundaryQuadrature, __pyx_v_fluxBoundaryConditionsDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, __pyx_v_stressTraceBoundaryConditionsSetterDict, __pyx_v_stabilization, __pyx_v_shockCapturing, __pyx_v_conservativeFluxDict, __pyx_v_numericalFluxType, __pyx_v_TimeIntegrationClass, __pyx_v_massLumping, __pyx_v_reactionLumping, __pyx_v_options, __pyx_v_name, __pyx_v_reuse_trial_and_test_quadrature, __pyx_v_sd, __pyx_v_movingDomain);
10549 
10550  /* "ADR.pyx":571
10551  * """
10552  * nCalls=0
10553  * def __init__(self, # <<<<<<<<<<<<<<
10554  * uDict,
10555  * phiDict,
10556  */
10557 
10558  /* function exit code */
10559  __Pyx_RefNannyFinishContext();
10560  return __pyx_r;
10561 }
10562 
10563 static PyObject *__pyx_pf_3ADR_10LevelModel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_uDict, PyObject *__pyx_v_phiDict, PyObject *__pyx_v_testSpaceDict, PyObject *__pyx_v_matType, PyObject *__pyx_v_dofBoundaryConditionsDict, PyObject *__pyx_v_dofBoundaryConditionsSetterDict, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_elementQuadrature, PyObject *__pyx_v_elementBoundaryQuadrature, PyObject *__pyx_v_fluxBoundaryConditionsDict, PyObject *__pyx_v_advectiveFluxBoundaryConditionsSetterDict, PyObject *__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, CYTHON_UNUSED PyObject *__pyx_v_stressTraceBoundaryConditionsSetterDict, PyObject *__pyx_v_stabilization, PyObject *__pyx_v_shockCapturing, PyObject *__pyx_v_conservativeFluxDict, PyObject *__pyx_v_numericalFluxType, PyObject *__pyx_v_TimeIntegrationClass, PyObject *__pyx_v_massLumping, PyObject *__pyx_v_reactionLumping, PyObject *__pyx_v_options, PyObject *__pyx_v_name, PyObject *__pyx_v_reuse_trial_and_test_quadrature, PyObject *__pyx_v_sd, PyObject *__pyx_v_movingDomain) {
10564  PyObject *__pyx_v_Comm = NULL;
10565  PyObject *__pyx_v_ci = NULL;
10566  PyObject *__pyx_v_flag = NULL;
10567  PyObject *__pyx_v_diffusionDict = NULL;
10568  PyObject *__pyx_v_elementQuadratureDict = NULL;
10569  int __pyx_v_elemQuadIsDict;
10570  PyObject *__pyx_v_I = NULL;
10571  PyObject *__pyx_v_elementBoundaryQuadratureDict = NULL;
10572  PyObject *__pyx_v_cj = NULL;
10573  PyObject *__pyx_v_ebNE = NULL;
10574  PyObject *__pyx_v_ebN = NULL;
10575  PyObject *__pyx_v_eN_global = NULL;
10576  PyObject *__pyx_v_ebN_element = NULL;
10577  PyObject *__pyx_v_i = NULL;
10578  PyObject *__pyx_v_nI = NULL;
10579  PyObject *__pyx_v_n = NULL;
10580  PyObject *__pyx_v_comm = NULL;
10581  PyObject *__pyx_v_k = NULL;
10582  PyObject *__pyx_v_PostProcessingTools = NULL;
10583  PyObject *__pyx_v_Archiver = NULL;
10584  PyObject *__pyx_v_fbcObject = NULL;
10585  PyObject *__pyx_v_t = NULL;
10586  PyObject *__pyx_v_g = NULL;
10587  PyObject *__pyx_v_ck = NULL;
10588  PyObject *__pyx_v_diffusiveFluxBoundaryConditionsDict = NULL;
10589  long __pyx_v_compKernelFlag;
10590  PyObject *__pyx_v_u_j = NULL;
10591  PyObject *__pyx_v_phi_k = NULL;
10592  PyObject *__pyx_v_femSpace = NULL;
10593  PyObject *__pyx_v_dc = NULL;
10594  PyObject *__pyx_r = NULL;
10595  __Pyx_RefNannyDeclarations
10596  PyObject *__pyx_t_1 = NULL;
10597  PyObject *__pyx_t_2 = NULL;
10598  int __pyx_t_3;
10599  Py_ssize_t __pyx_t_4;
10600  PyObject *(*__pyx_t_5)(PyObject *);
10601  PyObject *__pyx_t_6 = NULL;
10602  PyObject *__pyx_t_7 = NULL;
10603  PyObject *__pyx_t_8 = NULL;
10604  int __pyx_t_9;
10605  Py_ssize_t __pyx_t_10;
10606  PyObject *(*__pyx_t_11)(PyObject *);
10607  Py_ssize_t __pyx_t_12;
10608  PyObject *(*__pyx_t_13)(PyObject *);
10609  int __pyx_t_14;
10610  PyObject *__pyx_t_15 = NULL;
10611  PyObject *(*__pyx_t_16)(PyObject *);
10612  int __pyx_t_17;
10613  int __pyx_t_18;
10614  Py_ssize_t __pyx_t_19;
10615  int __pyx_t_20;
10616  PyObject *__pyx_t_21 = NULL;
10617  PyObject *__pyx_t_22 = NULL;
10618  Py_ssize_t __pyx_t_23;
10619  Py_ssize_t __pyx_t_24;
10620  int __pyx_t_25;
10621  PyObject *__pyx_t_26 = NULL;
10622  __Pyx_RefNannySetupContext("__init__", 0);
10623 
10624  /* "ADR.pyx":597
10625  * sd = True,
10626  * movingDomain=False):#,
10627  * from proteus import Comm # <<<<<<<<<<<<<<
10628  * #
10629  * #set the objects describing the method and boundary conditions
10630  */
10631  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
10632  __Pyx_GOTREF(__pyx_t_1);
10633  __Pyx_INCREF(__pyx_n_s_Comm);
10634  __Pyx_GIVEREF(__pyx_n_s_Comm);
10635  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Comm);
10636  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
10637  __Pyx_GOTREF(__pyx_t_2);
10638  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10639  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
10640  __Pyx_GOTREF(__pyx_t_1);
10641  __Pyx_INCREF(__pyx_t_1);
10642  __pyx_v_Comm = __pyx_t_1;
10643  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10644  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10645 
10646  /* "ADR.pyx":601
10647  * #set the objects describing the method and boundary conditions
10648  * #
10649  * self.movingDomain=movingDomain # <<<<<<<<<<<<<<
10650  * self.tLast_mesh=None
10651  * #
10652  */
10653  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_movingDomain, __pyx_v_movingDomain) < 0) __PYX_ERR(0, 601, __pyx_L1_error)
10654 
10655  /* "ADR.pyx":602
10656  * #
10657  * self.movingDomain=movingDomain
10658  * self.tLast_mesh=None # <<<<<<<<<<<<<<
10659  * #
10660  * self.name=name
10661  */
10662  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tLast_mesh, Py_None) < 0) __PYX_ERR(0, 602, __pyx_L1_error)
10663 
10664  /* "ADR.pyx":604
10665  * self.tLast_mesh=None
10666  * #
10667  * self.name=name # <<<<<<<<<<<<<<
10668  * self.sd=sd
10669  * self.Hess=False
10670  */
10671  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 604, __pyx_L1_error)
10672 
10673  /* "ADR.pyx":605
10674  * #
10675  * self.name=name
10676  * self.sd=sd # <<<<<<<<<<<<<<
10677  * self.Hess=False
10678  * self.lowmem=True
10679  */
10680  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sd, __pyx_v_sd) < 0) __PYX_ERR(0, 605, __pyx_L1_error)
10681 
10682  /* "ADR.pyx":606
10683  * self.name=name
10684  * self.sd=sd
10685  * self.Hess=False # <<<<<<<<<<<<<<
10686  * self.lowmem=True
10687  * self.timeTerm=True#allow turning off the time derivative
10688  */
10689  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_Hess, Py_False) < 0) __PYX_ERR(0, 606, __pyx_L1_error)
10690 
10691  /* "ADR.pyx":607
10692  * self.sd=sd
10693  * self.Hess=False
10694  * self.lowmem=True # <<<<<<<<<<<<<<
10695  * self.timeTerm=True#allow turning off the time derivative
10696  * #self.lowmem=False
10697  */
10698  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lowmem, Py_True) < 0) __PYX_ERR(0, 607, __pyx_L1_error)
10699 
10700  /* "ADR.pyx":608
10701  * self.Hess=False
10702  * self.lowmem=True
10703  * self.timeTerm=True#allow turning off the time derivative # <<<<<<<<<<<<<<
10704  * #self.lowmem=False
10705  * self.testIsTrial=True
10706  */
10707  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timeTerm, Py_True) < 0) __PYX_ERR(0, 608, __pyx_L1_error)
10708 
10709  /* "ADR.pyx":610
10710  * self.timeTerm=True#allow turning off the time derivative
10711  * #self.lowmem=False
10712  * self.testIsTrial=True # <<<<<<<<<<<<<<
10713  * self.phiTrialIsTrial=True
10714  * self.u = uDict
10715  */
10716  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_testIsTrial, Py_True) < 0) __PYX_ERR(0, 610, __pyx_L1_error)
10717 
10718  /* "ADR.pyx":611
10719  * #self.lowmem=False
10720  * self.testIsTrial=True
10721  * self.phiTrialIsTrial=True # <<<<<<<<<<<<<<
10722  * self.u = uDict
10723  * self.ua = {}#analytical solutions
10724  */
10725  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_phiTrialIsTrial, Py_True) < 0) __PYX_ERR(0, 611, __pyx_L1_error)
10726 
10727  /* "ADR.pyx":612
10728  * self.testIsTrial=True
10729  * self.phiTrialIsTrial=True
10730  * self.u = uDict # <<<<<<<<<<<<<<
10731  * self.ua = {}#analytical solutions
10732  * self.phi = phiDict
10733  */
10734  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_u, __pyx_v_uDict) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
10735 
10736  /* "ADR.pyx":613
10737  * self.phiTrialIsTrial=True
10738  * self.u = uDict
10739  * self.ua = {}#analytical solutions # <<<<<<<<<<<<<<
10740  * self.phi = phiDict
10741  * self.dphi={}
10742  */
10743  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
10744  __Pyx_GOTREF(__pyx_t_2);
10745  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ua, __pyx_t_2) < 0) __PYX_ERR(0, 613, __pyx_L1_error)
10746  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10747 
10748  /* "ADR.pyx":614
10749  * self.u = uDict
10750  * self.ua = {}#analytical solutions
10751  * self.phi = phiDict # <<<<<<<<<<<<<<
10752  * self.dphi={}
10753  * self.matType = matType
10754  */
10755  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_phi, __pyx_v_phiDict) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
10756 
10757  /* "ADR.pyx":615
10758  * self.ua = {}#analytical solutions
10759  * self.phi = phiDict
10760  * self.dphi={} # <<<<<<<<<<<<<<
10761  * self.matType = matType
10762  * #mwf try to reuse test and trial information across components if spaces are the same
10763  */
10764  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
10765  __Pyx_GOTREF(__pyx_t_2);
10766  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dphi, __pyx_t_2) < 0) __PYX_ERR(0, 615, __pyx_L1_error)
10767  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10768 
10769  /* "ADR.pyx":616
10770  * self.phi = phiDict
10771  * self.dphi={}
10772  * self.matType = matType # <<<<<<<<<<<<<<
10773  * #mwf try to reuse test and trial information across components if spaces are the same
10774  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10775  */
10776  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_matType, __pyx_v_matType) < 0) __PYX_ERR(0, 616, __pyx_L1_error)
10777 
10778  /* "ADR.pyx":618
10779  * self.matType = matType
10780  * #mwf try to reuse test and trial information across components if spaces are the same
10781  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False # <<<<<<<<<<<<<<
10782  * if self.reuse_test_trial_quadrature:
10783  * for ci in range(1,coefficients.nc):
10784  */
10785  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reuse_test_trial_quadrature, __pyx_v_reuse_trial_and_test_quadrature) < 0) __PYX_ERR(0, 618, __pyx_L1_error)
10786 
10787  /* "ADR.pyx":619
10788  * #mwf try to reuse test and trial information across components if spaces are the same
10789  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10790  * if self.reuse_test_trial_quadrature: # <<<<<<<<<<<<<<
10791  * for ci in range(1,coefficients.nc):
10792  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
10793  */
10794  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reuse_test_trial_quadrature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error)
10795  __Pyx_GOTREF(__pyx_t_2);
10796  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 619, __pyx_L1_error)
10797  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10798  if (__pyx_t_3) {
10799 
10800  /* "ADR.pyx":620
10801  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10802  * if self.reuse_test_trial_quadrature:
10803  * for ci in range(1,coefficients.nc): # <<<<<<<<<<<<<<
10804  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
10805  * ## Simplicial Mesh
10806  */
10807  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_nc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
10808  __Pyx_GOTREF(__pyx_t_2);
10809  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error)
10810  __Pyx_GOTREF(__pyx_t_1);
10811  __Pyx_INCREF(__pyx_int_1);
10812  __Pyx_GIVEREF(__pyx_int_1);
10813  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1);
10814  __Pyx_GIVEREF(__pyx_t_2);
10815  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
10816  __pyx_t_2 = 0;
10817  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
10818  __Pyx_GOTREF(__pyx_t_2);
10819  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10820  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
10821  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
10822  __pyx_t_5 = NULL;
10823  } else {
10824  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error)
10825  __Pyx_GOTREF(__pyx_t_1);
10826  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 620, __pyx_L1_error)
10827  }
10828  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10829  for (;;) {
10830  if (likely(!__pyx_t_5)) {
10831  if (likely(PyList_CheckExact(__pyx_t_1))) {
10832  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
10833  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10834  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 620, __pyx_L1_error)
10835  #else
10836  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
10837  __Pyx_GOTREF(__pyx_t_2);
10838  #endif
10839  } else {
10840  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
10841  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10842  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 620, __pyx_L1_error)
10843  #else
10844  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
10845  __Pyx_GOTREF(__pyx_t_2);
10846  #endif
10847  }
10848  } else {
10849  __pyx_t_2 = __pyx_t_5(__pyx_t_1);
10850  if (unlikely(!__pyx_t_2)) {
10851  PyObject* exc_type = PyErr_Occurred();
10852  if (exc_type) {
10853  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
10854  else __PYX_ERR(0, 620, __pyx_L1_error)
10855  }
10856  break;
10857  }
10858  __Pyx_GOTREF(__pyx_t_2);
10859  }
10860  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_2);
10861  __pyx_t_2 = 0;
10862 
10863  /* "ADR.pyx":621
10864  * if self.reuse_test_trial_quadrature:
10865  * for ci in range(1,coefficients.nc):
10866  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!" # <<<<<<<<<<<<<<
10867  * ## Simplicial Mesh
10868  * self.mesh = self.u[0].femSpace.mesh #assume the same mesh for all components for now
10869  */
10870  #ifndef CYTHON_WITHOUT_ASSERTIONS
10871  if (unlikely(!Py_OptimizeFlag)) {
10872  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
10873  __Pyx_GOTREF(__pyx_t_2);
10874  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error)
10875  __Pyx_GOTREF(__pyx_t_6);
10876  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10877  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
10878  __Pyx_GOTREF(__pyx_t_2);
10879  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10880  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error)
10881  __Pyx_GOTREF(__pyx_t_6);
10882  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10883  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
10884  __Pyx_GOTREF(__pyx_t_2);
10885  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10886  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error)
10887  __Pyx_GOTREF(__pyx_t_6);
10888  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 621, __pyx_L1_error)
10889  __Pyx_GOTREF(__pyx_t_7);
10890  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10891  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error)
10892  __Pyx_GOTREF(__pyx_t_6);
10893  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10894  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 621, __pyx_L1_error)
10895  __Pyx_GOTREF(__pyx_t_7);
10896  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10897  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error)
10898  __Pyx_GOTREF(__pyx_t_6);
10899  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10900  __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 621, __pyx_L1_error)
10901  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10902  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10903  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 621, __pyx_L1_error)
10904  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10905  if (unlikely(!__pyx_t_3)) {
10906  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_to_reuse_test_trial_quad_all_fem);
10907  __PYX_ERR(0, 621, __pyx_L1_error)
10908  }
10909  }
10910  #endif
10911 
10912  /* "ADR.pyx":620
10913  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10914  * if self.reuse_test_trial_quadrature:
10915  * for ci in range(1,coefficients.nc): # <<<<<<<<<<<<<<
10916  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
10917  * ## Simplicial Mesh
10918  */
10919  }
10920  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10921 
10922  /* "ADR.pyx":619
10923  * #mwf try to reuse test and trial information across components if spaces are the same
10924  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10925  * if self.reuse_test_trial_quadrature: # <<<<<<<<<<<<<<
10926  * for ci in range(1,coefficients.nc):
10927  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
10928  */
10929  }
10930 
10931  /* "ADR.pyx":623
10932  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
10933  * ## Simplicial Mesh
10934  * self.mesh = self.u[0].femSpace.mesh #assume the same mesh for all components for now # <<<<<<<<<<<<<<
10935  * self.testSpace = testSpaceDict
10936  * self.dirichletConditions = dofBoundaryConditionsDict
10937  */
10938  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
10939  __Pyx_GOTREF(__pyx_t_1);
10940  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L1_error)
10941  __Pyx_GOTREF(__pyx_t_7);
10942  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10943  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
10944  __Pyx_GOTREF(__pyx_t_1);
10945  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10946  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L1_error)
10947  __Pyx_GOTREF(__pyx_t_7);
10948  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10949  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mesh, __pyx_t_7) < 0) __PYX_ERR(0, 623, __pyx_L1_error)
10950  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10951 
10952  /* "ADR.pyx":624
10953  * ## Simplicial Mesh
10954  * self.mesh = self.u[0].femSpace.mesh #assume the same mesh for all components for now
10955  * self.testSpace = testSpaceDict # <<<<<<<<<<<<<<
10956  * self.dirichletConditions = dofBoundaryConditionsDict
10957  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints
10958  */
10959  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_testSpace, __pyx_v_testSpaceDict) < 0) __PYX_ERR(0, 624, __pyx_L1_error)
10960 
10961  /* "ADR.pyx":625
10962  * self.mesh = self.u[0].femSpace.mesh #assume the same mesh for all components for now
10963  * self.testSpace = testSpaceDict
10964  * self.dirichletConditions = dofBoundaryConditionsDict # <<<<<<<<<<<<<<
10965  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints
10966  * self.coefficients = coefficients
10967  */
10968  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirichletConditions, __pyx_v_dofBoundaryConditionsDict) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
10969 
10970  /* "ADR.pyx":626
10971  * self.testSpace = testSpaceDict
10972  * self.dirichletConditions = dofBoundaryConditionsDict
10973  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints # <<<<<<<<<<<<<<
10974  * self.coefficients = coefficients
10975  * self.coefficients.initializeMesh(self.mesh)
10976  */
10977  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirichletNodeSetList, Py_None) < 0) __PYX_ERR(0, 626, __pyx_L1_error)
10978 
10979  /* "ADR.pyx":627
10980  * self.dirichletConditions = dofBoundaryConditionsDict
10981  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints
10982  * self.coefficients = coefficients # <<<<<<<<<<<<<<
10983  * self.coefficients.initializeMesh(self.mesh)
10984  * self.nc = self.coefficients.nc
10985  */
10986  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_coefficients, __pyx_v_coefficients) < 0) __PYX_ERR(0, 627, __pyx_L1_error)
10987 
10988  /* "ADR.pyx":628
10989  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints
10990  * self.coefficients = coefficients
10991  * self.coefficients.initializeMesh(self.mesh) # <<<<<<<<<<<<<<
10992  * self.nc = self.coefficients.nc
10993  * self.stabilization = stabilization
10994  */
10995  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error)
10996  __Pyx_GOTREF(__pyx_t_1);
10997  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_initializeMesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 628, __pyx_L1_error)
10998  __Pyx_GOTREF(__pyx_t_6);
10999  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11000  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error)
11001  __Pyx_GOTREF(__pyx_t_1);
11002  __pyx_t_2 = NULL;
11003  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
11004  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
11005  if (likely(__pyx_t_2)) {
11006  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
11007  __Pyx_INCREF(__pyx_t_2);
11008  __Pyx_INCREF(function);
11009  __Pyx_DECREF_SET(__pyx_t_6, function);
11010  }
11011  }
11012  if (!__pyx_t_2) {
11013  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error)
11014  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11015  __Pyx_GOTREF(__pyx_t_7);
11016  } else {
11017  #if CYTHON_FAST_PYCALL
11018  if (PyFunction_Check(__pyx_t_6)) {
11019  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_1};
11020  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error)
11021  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11022  __Pyx_GOTREF(__pyx_t_7);
11023  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11024  } else
11025  #endif
11026  #if CYTHON_FAST_PYCCALL
11027  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
11028  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_1};
11029  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error)
11030  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11031  __Pyx_GOTREF(__pyx_t_7);
11032  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11033  } else
11034  #endif
11035  {
11036  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 628, __pyx_L1_error)
11037  __Pyx_GOTREF(__pyx_t_8);
11038  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
11039  __Pyx_GIVEREF(__pyx_t_1);
11040  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_1);
11041  __pyx_t_1 = 0;
11042  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error)
11043  __Pyx_GOTREF(__pyx_t_7);
11044  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11045  }
11046  }
11047  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11048  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11049 
11050  /* "ADR.pyx":629
11051  * self.coefficients = coefficients
11052  * self.coefficients.initializeMesh(self.mesh)
11053  * self.nc = self.coefficients.nc # <<<<<<<<<<<<<<
11054  * self.stabilization = stabilization
11055  * self.shockCapturing = shockCapturing
11056  */
11057  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 629, __pyx_L1_error)
11058  __Pyx_GOTREF(__pyx_t_7);
11059  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 629, __pyx_L1_error)
11060  __Pyx_GOTREF(__pyx_t_6);
11061  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11062  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nc, __pyx_t_6) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
11063  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11064 
11065  /* "ADR.pyx":630
11066  * self.coefficients.initializeMesh(self.mesh)
11067  * self.nc = self.coefficients.nc
11068  * self.stabilization = stabilization # <<<<<<<<<<<<<<
11069  * self.shockCapturing = shockCapturing
11070  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now
11071  */
11072  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilization, __pyx_v_stabilization) < 0) __PYX_ERR(0, 630, __pyx_L1_error)
11073 
11074  /* "ADR.pyx":631
11075  * self.nc = self.coefficients.nc
11076  * self.stabilization = stabilization
11077  * self.shockCapturing = shockCapturing # <<<<<<<<<<<<<<
11078  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now
11079  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict
11080  */
11081  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing, __pyx_v_shockCapturing) < 0) __PYX_ERR(0, 631, __pyx_L1_error)
11082 
11083  /* "ADR.pyx":632
11084  * self.stabilization = stabilization
11085  * self.shockCapturing = shockCapturing
11086  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now # <<<<<<<<<<<<<<
11087  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict
11088  * self.advectiveFluxBoundaryConditionsSetterDict=advectiveFluxBoundaryConditionsSetterDict
11089  */
11090  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_conservativeFlux, __pyx_v_conservativeFluxDict) < 0) __PYX_ERR(0, 632, __pyx_L1_error)
11091 
11092  /* "ADR.pyx":633
11093  * self.shockCapturing = shockCapturing
11094  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now
11095  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict # <<<<<<<<<<<<<<
11096  * self.advectiveFluxBoundaryConditionsSetterDict=advectiveFluxBoundaryConditionsSetterDict
11097  * self.diffusiveFluxBoundaryConditionsSetterDictDict = diffusiveFluxBoundaryConditionsSetterDictDict
11098  */
11099  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditions, __pyx_v_fluxBoundaryConditionsDict) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
11100 
11101  /* "ADR.pyx":634
11102  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now
11103  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict
11104  * self.advectiveFluxBoundaryConditionsSetterDict=advectiveFluxBoundaryConditionsSetterDict # <<<<<<<<<<<<<<
11105  * self.diffusiveFluxBoundaryConditionsSetterDictDict = diffusiveFluxBoundaryConditionsSetterDictDict
11106  * #determine whether the stabilization term is nonlinear
11107  */
11108  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_advectiveFluxBoundaryConditionsS, __pyx_v_advectiveFluxBoundaryConditionsSetterDict) < 0) __PYX_ERR(0, 634, __pyx_L1_error)
11109 
11110  /* "ADR.pyx":635
11111  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict
11112  * self.advectiveFluxBoundaryConditionsSetterDict=advectiveFluxBoundaryConditionsSetterDict
11113  * self.diffusiveFluxBoundaryConditionsSetterDictDict = diffusiveFluxBoundaryConditionsSetterDictDict # <<<<<<<<<<<<<<
11114  * #determine whether the stabilization term is nonlinear
11115  * self.stabilizationIsNonlinear = False
11116  */
11117  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_diffusiveFluxBoundaryConditionsS, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
11118 
11119  /* "ADR.pyx":637
11120  * self.diffusiveFluxBoundaryConditionsSetterDictDict = diffusiveFluxBoundaryConditionsSetterDictDict
11121  * #determine whether the stabilization term is nonlinear
11122  * self.stabilizationIsNonlinear = False # <<<<<<<<<<<<<<
11123  * #cek come back
11124  * if self.stabilization is not None:
11125  */
11126  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_False) < 0) __PYX_ERR(0, 637, __pyx_L1_error)
11127 
11128  /* "ADR.pyx":639
11129  * self.stabilizationIsNonlinear = False
11130  * #cek come back
11131  * if self.stabilization is not None: # <<<<<<<<<<<<<<
11132  * for ci in range(self.nc):
11133  * if coefficients.mass.has_key(ci):
11134  */
11135  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 639, __pyx_L1_error)
11136  __Pyx_GOTREF(__pyx_t_6);
11137  __pyx_t_3 = (__pyx_t_6 != Py_None);
11138  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11139  __pyx_t_9 = (__pyx_t_3 != 0);
11140  if (__pyx_t_9) {
11141 
11142  /* "ADR.pyx":640
11143  * #cek come back
11144  * if self.stabilization is not None:
11145  * for ci in range(self.nc): # <<<<<<<<<<<<<<
11146  * if coefficients.mass.has_key(ci):
11147  * for flag in coefficients.mass[ci].values():
11148  */
11149  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 640, __pyx_L1_error)
11150  __Pyx_GOTREF(__pyx_t_6);
11151  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 640, __pyx_L1_error)
11152  __Pyx_GOTREF(__pyx_t_7);
11153  __Pyx_GIVEREF(__pyx_t_6);
11154  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
11155  __pyx_t_6 = 0;
11156  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 640, __pyx_L1_error)
11157  __Pyx_GOTREF(__pyx_t_6);
11158  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11159  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
11160  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
11161  __pyx_t_5 = NULL;
11162  } else {
11163  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 640, __pyx_L1_error)
11164  __Pyx_GOTREF(__pyx_t_7);
11165  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 640, __pyx_L1_error)
11166  }
11167  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11168  for (;;) {
11169  if (likely(!__pyx_t_5)) {
11170  if (likely(PyList_CheckExact(__pyx_t_7))) {
11171  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
11172  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11173  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 640, __pyx_L1_error)
11174  #else
11175  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 640, __pyx_L1_error)
11176  __Pyx_GOTREF(__pyx_t_6);
11177  #endif
11178  } else {
11179  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
11180  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11181  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 640, __pyx_L1_error)
11182  #else
11183  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 640, __pyx_L1_error)
11184  __Pyx_GOTREF(__pyx_t_6);
11185  #endif
11186  }
11187  } else {
11188  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
11189  if (unlikely(!__pyx_t_6)) {
11190  PyObject* exc_type = PyErr_Occurred();
11191  if (exc_type) {
11192  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11193  else __PYX_ERR(0, 640, __pyx_L1_error)
11194  }
11195  break;
11196  }
11197  __Pyx_GOTREF(__pyx_t_6);
11198  }
11199  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_6);
11200  __pyx_t_6 = 0;
11201 
11202  /* "ADR.pyx":641
11203  * if self.stabilization is not None:
11204  * for ci in range(self.nc):
11205  * if coefficients.mass.has_key(ci): # <<<<<<<<<<<<<<
11206  * for flag in coefficients.mass[ci].values():
11207  * if flag == 'nonlinear':
11208  */
11209  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_mass); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 641, __pyx_L1_error)
11210  __Pyx_GOTREF(__pyx_t_8);
11211  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_has_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
11212  __Pyx_GOTREF(__pyx_t_1);
11213  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11214  __pyx_t_8 = NULL;
11215  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
11216  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
11217  if (likely(__pyx_t_8)) {
11218  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
11219  __Pyx_INCREF(__pyx_t_8);
11220  __Pyx_INCREF(function);
11221  __Pyx_DECREF_SET(__pyx_t_1, function);
11222  }
11223  }
11224  if (!__pyx_t_8) {
11225  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 641, __pyx_L1_error)
11226  __Pyx_GOTREF(__pyx_t_6);
11227  } else {
11228  #if CYTHON_FAST_PYCALL
11229  if (PyFunction_Check(__pyx_t_1)) {
11230  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_ci};
11231  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 641, __pyx_L1_error)
11232  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11233  __Pyx_GOTREF(__pyx_t_6);
11234  } else
11235  #endif
11236  #if CYTHON_FAST_PYCCALL
11237  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
11238  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_ci};
11239  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 641, __pyx_L1_error)
11240  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11241  __Pyx_GOTREF(__pyx_t_6);
11242  } else
11243  #endif
11244  {
11245  __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
11246  __Pyx_GOTREF(__pyx_t_2);
11247  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
11248  __Pyx_INCREF(__pyx_v_ci);
11249  __Pyx_GIVEREF(__pyx_v_ci);
11250  PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_ci);
11251  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 641, __pyx_L1_error)
11252  __Pyx_GOTREF(__pyx_t_6);
11253  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11254  }
11255  }
11256  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11257  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 641, __pyx_L1_error)
11258  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11259  if (__pyx_t_9) {
11260 
11261  /* "ADR.pyx":642
11262  * for ci in range(self.nc):
11263  * if coefficients.mass.has_key(ci):
11264  * for flag in coefficients.mass[ci].values(): # <<<<<<<<<<<<<<
11265  * if flag == 'nonlinear':
11266  * self.stabilizationIsNonlinear=True
11267  */
11268  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_mass); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
11269  __Pyx_GOTREF(__pyx_t_1);
11270  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
11271  __Pyx_GOTREF(__pyx_t_2);
11272  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11273  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
11274  __Pyx_GOTREF(__pyx_t_1);
11275  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11276  __pyx_t_2 = NULL;
11277  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
11278  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
11279  if (likely(__pyx_t_2)) {
11280  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
11281  __Pyx_INCREF(__pyx_t_2);
11282  __Pyx_INCREF(function);
11283  __Pyx_DECREF_SET(__pyx_t_1, function);
11284  }
11285  }
11286  if (__pyx_t_2) {
11287  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error)
11288  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11289  } else {
11290  __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error)
11291  }
11292  __Pyx_GOTREF(__pyx_t_6);
11293  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11294  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
11295  __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
11296  __pyx_t_11 = NULL;
11297  } else {
11298  __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
11299  __Pyx_GOTREF(__pyx_t_1);
11300  __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 642, __pyx_L1_error)
11301  }
11302  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11303  for (;;) {
11304  if (likely(!__pyx_t_11)) {
11305  if (likely(PyList_CheckExact(__pyx_t_1))) {
11306  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
11307  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11308  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 642, __pyx_L1_error)
11309  #else
11310  __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error)
11311  __Pyx_GOTREF(__pyx_t_6);
11312  #endif
11313  } else {
11314  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
11315  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11316  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 642, __pyx_L1_error)
11317  #else
11318  __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error)
11319  __Pyx_GOTREF(__pyx_t_6);
11320  #endif
11321  }
11322  } else {
11323  __pyx_t_6 = __pyx_t_11(__pyx_t_1);
11324  if (unlikely(!__pyx_t_6)) {
11325  PyObject* exc_type = PyErr_Occurred();
11326  if (exc_type) {
11327  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11328  else __PYX_ERR(0, 642, __pyx_L1_error)
11329  }
11330  break;
11331  }
11332  __Pyx_GOTREF(__pyx_t_6);
11333  }
11334  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_6);
11335  __pyx_t_6 = 0;
11336 
11337  /* "ADR.pyx":643
11338  * if coefficients.mass.has_key(ci):
11339  * for flag in coefficients.mass[ci].values():
11340  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11341  * self.stabilizationIsNonlinear=True
11342  * if coefficients.advection.has_key(ci):
11343  */
11344  __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 643, __pyx_L1_error)
11345  if (__pyx_t_9) {
11346 
11347  /* "ADR.pyx":644
11348  * for flag in coefficients.mass[ci].values():
11349  * if flag == 'nonlinear':
11350  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
11351  * if coefficients.advection.has_key(ci):
11352  * for flag in coefficients.advection[ci].values():
11353  */
11354  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(0, 644, __pyx_L1_error)
11355 
11356  /* "ADR.pyx":643
11357  * if coefficients.mass.has_key(ci):
11358  * for flag in coefficients.mass[ci].values():
11359  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11360  * self.stabilizationIsNonlinear=True
11361  * if coefficients.advection.has_key(ci):
11362  */
11363  }
11364 
11365  /* "ADR.pyx":642
11366  * for ci in range(self.nc):
11367  * if coefficients.mass.has_key(ci):
11368  * for flag in coefficients.mass[ci].values(): # <<<<<<<<<<<<<<
11369  * if flag == 'nonlinear':
11370  * self.stabilizationIsNonlinear=True
11371  */
11372  }
11373  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11374 
11375  /* "ADR.pyx":641
11376  * if self.stabilization is not None:
11377  * for ci in range(self.nc):
11378  * if coefficients.mass.has_key(ci): # <<<<<<<<<<<<<<
11379  * for flag in coefficients.mass[ci].values():
11380  * if flag == 'nonlinear':
11381  */
11382  }
11383 
11384  /* "ADR.pyx":645
11385  * if flag == 'nonlinear':
11386  * self.stabilizationIsNonlinear=True
11387  * if coefficients.advection.has_key(ci): # <<<<<<<<<<<<<<
11388  * for flag in coefficients.advection[ci].values():
11389  * if flag == 'nonlinear':
11390  */
11391  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_advection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 645, __pyx_L1_error)
11392  __Pyx_GOTREF(__pyx_t_6);
11393  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error)
11394  __Pyx_GOTREF(__pyx_t_2);
11395  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11396  __pyx_t_6 = NULL;
11397  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11398  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
11399  if (likely(__pyx_t_6)) {
11400  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11401  __Pyx_INCREF(__pyx_t_6);
11402  __Pyx_INCREF(function);
11403  __Pyx_DECREF_SET(__pyx_t_2, function);
11404  }
11405  }
11406  if (!__pyx_t_6) {
11407  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
11408  __Pyx_GOTREF(__pyx_t_1);
11409  } else {
11410  #if CYTHON_FAST_PYCALL
11411  if (PyFunction_Check(__pyx_t_2)) {
11412  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_ci};
11413  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
11414  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11415  __Pyx_GOTREF(__pyx_t_1);
11416  } else
11417  #endif
11418  #if CYTHON_FAST_PYCCALL
11419  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
11420  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_ci};
11421  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
11422  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11423  __Pyx_GOTREF(__pyx_t_1);
11424  } else
11425  #endif
11426  {
11427  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 645, __pyx_L1_error)
11428  __Pyx_GOTREF(__pyx_t_8);
11429  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
11430  __Pyx_INCREF(__pyx_v_ci);
11431  __Pyx_GIVEREF(__pyx_v_ci);
11432  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_ci);
11433  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
11434  __Pyx_GOTREF(__pyx_t_1);
11435  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11436  }
11437  }
11438  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11439  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 645, __pyx_L1_error)
11440  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11441  if (__pyx_t_9) {
11442 
11443  /* "ADR.pyx":646
11444  * self.stabilizationIsNonlinear=True
11445  * if coefficients.advection.has_key(ci):
11446  * for flag in coefficients.advection[ci].values(): # <<<<<<<<<<<<<<
11447  * if flag == 'nonlinear':
11448  * self.stabilizationIsNonlinear=True
11449  */
11450  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_advection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
11451  __Pyx_GOTREF(__pyx_t_2);
11452  __pyx_t_8 = PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 646, __pyx_L1_error)
11453  __Pyx_GOTREF(__pyx_t_8);
11454  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11455  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
11456  __Pyx_GOTREF(__pyx_t_2);
11457  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11458  __pyx_t_8 = NULL;
11459  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11460  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
11461  if (likely(__pyx_t_8)) {
11462  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11463  __Pyx_INCREF(__pyx_t_8);
11464  __Pyx_INCREF(function);
11465  __Pyx_DECREF_SET(__pyx_t_2, function);
11466  }
11467  }
11468  if (__pyx_t_8) {
11469  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
11470  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11471  } else {
11472  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
11473  }
11474  __Pyx_GOTREF(__pyx_t_1);
11475  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11476  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
11477  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0;
11478  __pyx_t_11 = NULL;
11479  } else {
11480  __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
11481  __Pyx_GOTREF(__pyx_t_2);
11482  __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 646, __pyx_L1_error)
11483  }
11484  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11485  for (;;) {
11486  if (likely(!__pyx_t_11)) {
11487  if (likely(PyList_CheckExact(__pyx_t_2))) {
11488  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break;
11489  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11490  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 646, __pyx_L1_error)
11491  #else
11492  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
11493  __Pyx_GOTREF(__pyx_t_1);
11494  #endif
11495  } else {
11496  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
11497  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11498  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 646, __pyx_L1_error)
11499  #else
11500  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
11501  __Pyx_GOTREF(__pyx_t_1);
11502  #endif
11503  }
11504  } else {
11505  __pyx_t_1 = __pyx_t_11(__pyx_t_2);
11506  if (unlikely(!__pyx_t_1)) {
11507  PyObject* exc_type = PyErr_Occurred();
11508  if (exc_type) {
11509  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11510  else __PYX_ERR(0, 646, __pyx_L1_error)
11511  }
11512  break;
11513  }
11514  __Pyx_GOTREF(__pyx_t_1);
11515  }
11516  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_1);
11517  __pyx_t_1 = 0;
11518 
11519  /* "ADR.pyx":647
11520  * if coefficients.advection.has_key(ci):
11521  * for flag in coefficients.advection[ci].values():
11522  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11523  * self.stabilizationIsNonlinear=True
11524  * if coefficients.diffusion.has_key(ci):
11525  */
11526  __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 647, __pyx_L1_error)
11527  if (__pyx_t_9) {
11528 
11529  /* "ADR.pyx":648
11530  * for flag in coefficients.advection[ci].values():
11531  * if flag == 'nonlinear':
11532  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
11533  * if coefficients.diffusion.has_key(ci):
11534  * for diffusionDict in coefficients.diffusion[ci].values():
11535  */
11536  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(0, 648, __pyx_L1_error)
11537 
11538  /* "ADR.pyx":647
11539  * if coefficients.advection.has_key(ci):
11540  * for flag in coefficients.advection[ci].values():
11541  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11542  * self.stabilizationIsNonlinear=True
11543  * if coefficients.diffusion.has_key(ci):
11544  */
11545  }
11546 
11547  /* "ADR.pyx":646
11548  * self.stabilizationIsNonlinear=True
11549  * if coefficients.advection.has_key(ci):
11550  * for flag in coefficients.advection[ci].values(): # <<<<<<<<<<<<<<
11551  * if flag == 'nonlinear':
11552  * self.stabilizationIsNonlinear=True
11553  */
11554  }
11555  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11556 
11557  /* "ADR.pyx":645
11558  * if flag == 'nonlinear':
11559  * self.stabilizationIsNonlinear=True
11560  * if coefficients.advection.has_key(ci): # <<<<<<<<<<<<<<
11561  * for flag in coefficients.advection[ci].values():
11562  * if flag == 'nonlinear':
11563  */
11564  }
11565 
11566  /* "ADR.pyx":649
11567  * if flag == 'nonlinear':
11568  * self.stabilizationIsNonlinear=True
11569  * if coefficients.diffusion.has_key(ci): # <<<<<<<<<<<<<<
11570  * for diffusionDict in coefficients.diffusion[ci].values():
11571  * for flag in diffusionDict.values():
11572  */
11573  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_diffusion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
11574  __Pyx_GOTREF(__pyx_t_1);
11575  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_has_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 649, __pyx_L1_error)
11576  __Pyx_GOTREF(__pyx_t_8);
11577  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11578  __pyx_t_1 = NULL;
11579  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
11580  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
11581  if (likely(__pyx_t_1)) {
11582  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
11583  __Pyx_INCREF(__pyx_t_1);
11584  __Pyx_INCREF(function);
11585  __Pyx_DECREF_SET(__pyx_t_8, function);
11586  }
11587  }
11588  if (!__pyx_t_1) {
11589  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
11590  __Pyx_GOTREF(__pyx_t_2);
11591  } else {
11592  #if CYTHON_FAST_PYCALL
11593  if (PyFunction_Check(__pyx_t_8)) {
11594  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_ci};
11595  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
11596  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11597  __Pyx_GOTREF(__pyx_t_2);
11598  } else
11599  #endif
11600  #if CYTHON_FAST_PYCCALL
11601  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
11602  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_ci};
11603  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
11604  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11605  __Pyx_GOTREF(__pyx_t_2);
11606  } else
11607  #endif
11608  {
11609  __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 649, __pyx_L1_error)
11610  __Pyx_GOTREF(__pyx_t_6);
11611  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
11612  __Pyx_INCREF(__pyx_v_ci);
11613  __Pyx_GIVEREF(__pyx_v_ci);
11614  PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_ci);
11615  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
11616  __Pyx_GOTREF(__pyx_t_2);
11617  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11618  }
11619  }
11620  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11621  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 649, __pyx_L1_error)
11622  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11623  if (__pyx_t_9) {
11624 
11625  /* "ADR.pyx":650
11626  * self.stabilizationIsNonlinear=True
11627  * if coefficients.diffusion.has_key(ci):
11628  * for diffusionDict in coefficients.diffusion[ci].values(): # <<<<<<<<<<<<<<
11629  * for flag in diffusionDict.values():
11630  * if flag != 'constant':
11631  */
11632  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_diffusion); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L1_error)
11633  __Pyx_GOTREF(__pyx_t_8);
11634  __pyx_t_6 = PyObject_GetItem(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 650, __pyx_L1_error)
11635  __Pyx_GOTREF(__pyx_t_6);
11636  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11637  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L1_error)
11638  __Pyx_GOTREF(__pyx_t_8);
11639  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11640  __pyx_t_6 = NULL;
11641  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
11642  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
11643  if (likely(__pyx_t_6)) {
11644  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
11645  __Pyx_INCREF(__pyx_t_6);
11646  __Pyx_INCREF(function);
11647  __Pyx_DECREF_SET(__pyx_t_8, function);
11648  }
11649  }
11650  if (__pyx_t_6) {
11651  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
11652  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11653  } else {
11654  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
11655  }
11656  __Pyx_GOTREF(__pyx_t_2);
11657  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11658  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
11659  __pyx_t_8 = __pyx_t_2; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0;
11660  __pyx_t_11 = NULL;
11661  } else {
11662  __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L1_error)
11663  __Pyx_GOTREF(__pyx_t_8);
11664  __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 650, __pyx_L1_error)
11665  }
11666  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11667  for (;;) {
11668  if (likely(!__pyx_t_11)) {
11669  if (likely(PyList_CheckExact(__pyx_t_8))) {
11670  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break;
11671  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11672  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 650, __pyx_L1_error)
11673  #else
11674  __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
11675  __Pyx_GOTREF(__pyx_t_2);
11676  #endif
11677  } else {
11678  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
11679  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11680  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 650, __pyx_L1_error)
11681  #else
11682  __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
11683  __Pyx_GOTREF(__pyx_t_2);
11684  #endif
11685  }
11686  } else {
11687  __pyx_t_2 = __pyx_t_11(__pyx_t_8);
11688  if (unlikely(!__pyx_t_2)) {
11689  PyObject* exc_type = PyErr_Occurred();
11690  if (exc_type) {
11691  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11692  else __PYX_ERR(0, 650, __pyx_L1_error)
11693  }
11694  break;
11695  }
11696  __Pyx_GOTREF(__pyx_t_2);
11697  }
11698  __Pyx_XDECREF_SET(__pyx_v_diffusionDict, __pyx_t_2);
11699  __pyx_t_2 = 0;
11700 
11701  /* "ADR.pyx":651
11702  * if coefficients.diffusion.has_key(ci):
11703  * for diffusionDict in coefficients.diffusion[ci].values():
11704  * for flag in diffusionDict.values(): # <<<<<<<<<<<<<<
11705  * if flag != 'constant':
11706  * self.stabilizationIsNonlinear=True
11707  */
11708  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_diffusionDict, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 651, __pyx_L1_error)
11709  __Pyx_GOTREF(__pyx_t_6);
11710  __pyx_t_1 = NULL;
11711  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
11712  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
11713  if (likely(__pyx_t_1)) {
11714  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
11715  __Pyx_INCREF(__pyx_t_1);
11716  __Pyx_INCREF(function);
11717  __Pyx_DECREF_SET(__pyx_t_6, function);
11718  }
11719  }
11720  if (__pyx_t_1) {
11721  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
11722  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11723  } else {
11724  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
11725  }
11726  __Pyx_GOTREF(__pyx_t_2);
11727  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11728  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
11729  __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0;
11730  __pyx_t_13 = NULL;
11731  } else {
11732  __pyx_t_12 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 651, __pyx_L1_error)
11733  __Pyx_GOTREF(__pyx_t_6);
11734  __pyx_t_13 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 651, __pyx_L1_error)
11735  }
11736  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11737  for (;;) {
11738  if (likely(!__pyx_t_13)) {
11739  if (likely(PyList_CheckExact(__pyx_t_6))) {
11740  if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_6)) break;
11741  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11742  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 651, __pyx_L1_error)
11743  #else
11744  __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
11745  __Pyx_GOTREF(__pyx_t_2);
11746  #endif
11747  } else {
11748  if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
11749  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11750  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 651, __pyx_L1_error)
11751  #else
11752  __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
11753  __Pyx_GOTREF(__pyx_t_2);
11754  #endif
11755  }
11756  } else {
11757  __pyx_t_2 = __pyx_t_13(__pyx_t_6);
11758  if (unlikely(!__pyx_t_2)) {
11759  PyObject* exc_type = PyErr_Occurred();
11760  if (exc_type) {
11761  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11762  else __PYX_ERR(0, 651, __pyx_L1_error)
11763  }
11764  break;
11765  }
11766  __Pyx_GOTREF(__pyx_t_2);
11767  }
11768  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_2);
11769  __pyx_t_2 = 0;
11770 
11771  /* "ADR.pyx":652
11772  * for diffusionDict in coefficients.diffusion[ci].values():
11773  * for flag in diffusionDict.values():
11774  * if flag != 'constant': # <<<<<<<<<<<<<<
11775  * self.stabilizationIsNonlinear=True
11776  * if coefficients.potential.has_key(ci):
11777  */
11778  __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_constant, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 652, __pyx_L1_error)
11779  if (__pyx_t_9) {
11780 
11781  /* "ADR.pyx":653
11782  * for flag in diffusionDict.values():
11783  * if flag != 'constant':
11784  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
11785  * if coefficients.potential.has_key(ci):
11786  * for flag in coefficients.potential[ci].values():
11787  */
11788  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
11789 
11790  /* "ADR.pyx":652
11791  * for diffusionDict in coefficients.diffusion[ci].values():
11792  * for flag in diffusionDict.values():
11793  * if flag != 'constant': # <<<<<<<<<<<<<<
11794  * self.stabilizationIsNonlinear=True
11795  * if coefficients.potential.has_key(ci):
11796  */
11797  }
11798 
11799  /* "ADR.pyx":651
11800  * if coefficients.diffusion.has_key(ci):
11801  * for diffusionDict in coefficients.diffusion[ci].values():
11802  * for flag in diffusionDict.values(): # <<<<<<<<<<<<<<
11803  * if flag != 'constant':
11804  * self.stabilizationIsNonlinear=True
11805  */
11806  }
11807  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11808 
11809  /* "ADR.pyx":650
11810  * self.stabilizationIsNonlinear=True
11811  * if coefficients.diffusion.has_key(ci):
11812  * for diffusionDict in coefficients.diffusion[ci].values(): # <<<<<<<<<<<<<<
11813  * for flag in diffusionDict.values():
11814  * if flag != 'constant':
11815  */
11816  }
11817  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11818 
11819  /* "ADR.pyx":649
11820  * if flag == 'nonlinear':
11821  * self.stabilizationIsNonlinear=True
11822  * if coefficients.diffusion.has_key(ci): # <<<<<<<<<<<<<<
11823  * for diffusionDict in coefficients.diffusion[ci].values():
11824  * for flag in diffusionDict.values():
11825  */
11826  }
11827 
11828  /* "ADR.pyx":654
11829  * if flag != 'constant':
11830  * self.stabilizationIsNonlinear=True
11831  * if coefficients.potential.has_key(ci): # <<<<<<<<<<<<<<
11832  * for flag in coefficients.potential[ci].values():
11833  * if flag == 'nonlinear':
11834  */
11835  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_potential); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 654, __pyx_L1_error)
11836  __Pyx_GOTREF(__pyx_t_6);
11837  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
11838  __Pyx_GOTREF(__pyx_t_2);
11839  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11840  __pyx_t_6 = NULL;
11841  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11842  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
11843  if (likely(__pyx_t_6)) {
11844  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11845  __Pyx_INCREF(__pyx_t_6);
11846  __Pyx_INCREF(function);
11847  __Pyx_DECREF_SET(__pyx_t_2, function);
11848  }
11849  }
11850  if (!__pyx_t_6) {
11851  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 654, __pyx_L1_error)
11852  __Pyx_GOTREF(__pyx_t_8);
11853  } else {
11854  #if CYTHON_FAST_PYCALL
11855  if (PyFunction_Check(__pyx_t_2)) {
11856  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_ci};
11857  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 654, __pyx_L1_error)
11858  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11859  __Pyx_GOTREF(__pyx_t_8);
11860  } else
11861  #endif
11862  #if CYTHON_FAST_PYCCALL
11863  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
11864  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_ci};
11865  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 654, __pyx_L1_error)
11866  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11867  __Pyx_GOTREF(__pyx_t_8);
11868  } else
11869  #endif
11870  {
11871  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
11872  __Pyx_GOTREF(__pyx_t_1);
11873  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
11874  __Pyx_INCREF(__pyx_v_ci);
11875  __Pyx_GIVEREF(__pyx_v_ci);
11876  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_ci);
11877  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 654, __pyx_L1_error)
11878  __Pyx_GOTREF(__pyx_t_8);
11879  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11880  }
11881  }
11882  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11883  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 654, __pyx_L1_error)
11884  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11885  if (__pyx_t_9) {
11886 
11887  /* "ADR.pyx":655
11888  * self.stabilizationIsNonlinear=True
11889  * if coefficients.potential.has_key(ci):
11890  * for flag in coefficients.potential[ci].values(): # <<<<<<<<<<<<<<
11891  * if flag == 'nonlinear':
11892  * self.stabilizationIsNonlinear=True
11893  */
11894  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_potential); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
11895  __Pyx_GOTREF(__pyx_t_2);
11896  __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error)
11897  __Pyx_GOTREF(__pyx_t_1);
11898  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11899  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
11900  __Pyx_GOTREF(__pyx_t_2);
11901  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11902  __pyx_t_1 = NULL;
11903  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11904  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
11905  if (likely(__pyx_t_1)) {
11906  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11907  __Pyx_INCREF(__pyx_t_1);
11908  __Pyx_INCREF(function);
11909  __Pyx_DECREF_SET(__pyx_t_2, function);
11910  }
11911  }
11912  if (__pyx_t_1) {
11913  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error)
11914  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11915  } else {
11916  __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error)
11917  }
11918  __Pyx_GOTREF(__pyx_t_8);
11919  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11920  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
11921  __pyx_t_2 = __pyx_t_8; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0;
11922  __pyx_t_11 = NULL;
11923  } else {
11924  __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
11925  __Pyx_GOTREF(__pyx_t_2);
11926  __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 655, __pyx_L1_error)
11927  }
11928  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11929  for (;;) {
11930  if (likely(!__pyx_t_11)) {
11931  if (likely(PyList_CheckExact(__pyx_t_2))) {
11932  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break;
11933  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11934  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 655, __pyx_L1_error)
11935  #else
11936  __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error)
11937  __Pyx_GOTREF(__pyx_t_8);
11938  #endif
11939  } else {
11940  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
11941  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11942  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 655, __pyx_L1_error)
11943  #else
11944  __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error)
11945  __Pyx_GOTREF(__pyx_t_8);
11946  #endif
11947  }
11948  } else {
11949  __pyx_t_8 = __pyx_t_11(__pyx_t_2);
11950  if (unlikely(!__pyx_t_8)) {
11951  PyObject* exc_type = PyErr_Occurred();
11952  if (exc_type) {
11953  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11954  else __PYX_ERR(0, 655, __pyx_L1_error)
11955  }
11956  break;
11957  }
11958  __Pyx_GOTREF(__pyx_t_8);
11959  }
11960  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_8);
11961  __pyx_t_8 = 0;
11962 
11963  /* "ADR.pyx":656
11964  * if coefficients.potential.has_key(ci):
11965  * for flag in coefficients.potential[ci].values():
11966  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11967  * self.stabilizationIsNonlinear=True
11968  * if coefficients.reaction.has_key(ci):
11969  */
11970  __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 656, __pyx_L1_error)
11971  if (__pyx_t_9) {
11972 
11973  /* "ADR.pyx":657
11974  * for flag in coefficients.potential[ci].values():
11975  * if flag == 'nonlinear':
11976  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
11977  * if coefficients.reaction.has_key(ci):
11978  * for flag in coefficients.reaction[ci].values():
11979  */
11980  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(0, 657, __pyx_L1_error)
11981 
11982  /* "ADR.pyx":656
11983  * if coefficients.potential.has_key(ci):
11984  * for flag in coefficients.potential[ci].values():
11985  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11986  * self.stabilizationIsNonlinear=True
11987  * if coefficients.reaction.has_key(ci):
11988  */
11989  }
11990 
11991  /* "ADR.pyx":655
11992  * self.stabilizationIsNonlinear=True
11993  * if coefficients.potential.has_key(ci):
11994  * for flag in coefficients.potential[ci].values(): # <<<<<<<<<<<<<<
11995  * if flag == 'nonlinear':
11996  * self.stabilizationIsNonlinear=True
11997  */
11998  }
11999  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12000 
12001  /* "ADR.pyx":654
12002  * if flag != 'constant':
12003  * self.stabilizationIsNonlinear=True
12004  * if coefficients.potential.has_key(ci): # <<<<<<<<<<<<<<
12005  * for flag in coefficients.potential[ci].values():
12006  * if flag == 'nonlinear':
12007  */
12008  }
12009 
12010  /* "ADR.pyx":658
12011  * if flag == 'nonlinear':
12012  * self.stabilizationIsNonlinear=True
12013  * if coefficients.reaction.has_key(ci): # <<<<<<<<<<<<<<
12014  * for flag in coefficients.reaction[ci].values():
12015  * if flag == 'nonlinear':
12016  */
12017  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_reaction); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 658, __pyx_L1_error)
12018  __Pyx_GOTREF(__pyx_t_8);
12019  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_has_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
12020  __Pyx_GOTREF(__pyx_t_1);
12021  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12022  __pyx_t_8 = NULL;
12023  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
12024  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
12025  if (likely(__pyx_t_8)) {
12026  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
12027  __Pyx_INCREF(__pyx_t_8);
12028  __Pyx_INCREF(function);
12029  __Pyx_DECREF_SET(__pyx_t_1, function);
12030  }
12031  }
12032  if (!__pyx_t_8) {
12033  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
12034  __Pyx_GOTREF(__pyx_t_2);
12035  } else {
12036  #if CYTHON_FAST_PYCALL
12037  if (PyFunction_Check(__pyx_t_1)) {
12038  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_ci};
12039  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
12040  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12041  __Pyx_GOTREF(__pyx_t_2);
12042  } else
12043  #endif
12044  #if CYTHON_FAST_PYCCALL
12045  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
12046  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_ci};
12047  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
12048  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12049  __Pyx_GOTREF(__pyx_t_2);
12050  } else
12051  #endif
12052  {
12053  __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 658, __pyx_L1_error)
12054  __Pyx_GOTREF(__pyx_t_6);
12055  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
12056  __Pyx_INCREF(__pyx_v_ci);
12057  __Pyx_GIVEREF(__pyx_v_ci);
12058  PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_ci);
12059  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
12060  __Pyx_GOTREF(__pyx_t_2);
12061  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12062  }
12063  }
12064  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12065  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 658, __pyx_L1_error)
12066  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12067  if (__pyx_t_9) {
12068 
12069  /* "ADR.pyx":659
12070  * self.stabilizationIsNonlinear=True
12071  * if coefficients.reaction.has_key(ci):
12072  * for flag in coefficients.reaction[ci].values(): # <<<<<<<<<<<<<<
12073  * if flag == 'nonlinear':
12074  * self.stabilizationIsNonlinear=True
12075  */
12076  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_reaction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
12077  __Pyx_GOTREF(__pyx_t_1);
12078  __pyx_t_6 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 659, __pyx_L1_error)
12079  __Pyx_GOTREF(__pyx_t_6);
12080  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12081  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
12082  __Pyx_GOTREF(__pyx_t_1);
12083  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12084  __pyx_t_6 = NULL;
12085  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
12086  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
12087  if (likely(__pyx_t_6)) {
12088  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
12089  __Pyx_INCREF(__pyx_t_6);
12090  __Pyx_INCREF(function);
12091  __Pyx_DECREF_SET(__pyx_t_1, function);
12092  }
12093  }
12094  if (__pyx_t_6) {
12095  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
12096  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12097  } else {
12098  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
12099  }
12100  __Pyx_GOTREF(__pyx_t_2);
12101  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12102  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
12103  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
12104  __pyx_t_11 = NULL;
12105  } else {
12106  __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
12107  __Pyx_GOTREF(__pyx_t_1);
12108  __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 659, __pyx_L1_error)
12109  }
12110  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12111  for (;;) {
12112  if (likely(!__pyx_t_11)) {
12113  if (likely(PyList_CheckExact(__pyx_t_1))) {
12114  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
12115  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12116  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 659, __pyx_L1_error)
12117  #else
12118  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
12119  __Pyx_GOTREF(__pyx_t_2);
12120  #endif
12121  } else {
12122  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
12123  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12124  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 659, __pyx_L1_error)
12125  #else
12126  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
12127  __Pyx_GOTREF(__pyx_t_2);
12128  #endif
12129  }
12130  } else {
12131  __pyx_t_2 = __pyx_t_11(__pyx_t_1);
12132  if (unlikely(!__pyx_t_2)) {
12133  PyObject* exc_type = PyErr_Occurred();
12134  if (exc_type) {
12135  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12136  else __PYX_ERR(0, 659, __pyx_L1_error)
12137  }
12138  break;
12139  }
12140  __Pyx_GOTREF(__pyx_t_2);
12141  }
12142  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_2);
12143  __pyx_t_2 = 0;
12144 
12145  /* "ADR.pyx":660
12146  * if coefficients.reaction.has_key(ci):
12147  * for flag in coefficients.reaction[ci].values():
12148  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12149  * self.stabilizationIsNonlinear=True
12150  * if coefficients.hamiltonian.has_key(ci):
12151  */
12152  __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 660, __pyx_L1_error)
12153  if (__pyx_t_9) {
12154 
12155  /* "ADR.pyx":661
12156  * for flag in coefficients.reaction[ci].values():
12157  * if flag == 'nonlinear':
12158  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
12159  * if coefficients.hamiltonian.has_key(ci):
12160  * for flag in coefficients.hamiltonian[ci].values():
12161  */
12162  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(0, 661, __pyx_L1_error)
12163 
12164  /* "ADR.pyx":660
12165  * if coefficients.reaction.has_key(ci):
12166  * for flag in coefficients.reaction[ci].values():
12167  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12168  * self.stabilizationIsNonlinear=True
12169  * if coefficients.hamiltonian.has_key(ci):
12170  */
12171  }
12172 
12173  /* "ADR.pyx":659
12174  * self.stabilizationIsNonlinear=True
12175  * if coefficients.reaction.has_key(ci):
12176  * for flag in coefficients.reaction[ci].values(): # <<<<<<<<<<<<<<
12177  * if flag == 'nonlinear':
12178  * self.stabilizationIsNonlinear=True
12179  */
12180  }
12181  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12182 
12183  /* "ADR.pyx":658
12184  * if flag == 'nonlinear':
12185  * self.stabilizationIsNonlinear=True
12186  * if coefficients.reaction.has_key(ci): # <<<<<<<<<<<<<<
12187  * for flag in coefficients.reaction[ci].values():
12188  * if flag == 'nonlinear':
12189  */
12190  }
12191 
12192  /* "ADR.pyx":662
12193  * if flag == 'nonlinear':
12194  * self.stabilizationIsNonlinear=True
12195  * if coefficients.hamiltonian.has_key(ci): # <<<<<<<<<<<<<<
12196  * for flag in coefficients.hamiltonian[ci].values():
12197  * if flag == 'nonlinear':
12198  */
12199  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_hamiltonian); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
12200  __Pyx_GOTREF(__pyx_t_2);
12201  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_has_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L1_error)
12202  __Pyx_GOTREF(__pyx_t_6);
12203  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12204  __pyx_t_2 = NULL;
12205  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
12206  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
12207  if (likely(__pyx_t_2)) {
12208  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12209  __Pyx_INCREF(__pyx_t_2);
12210  __Pyx_INCREF(function);
12211  __Pyx_DECREF_SET(__pyx_t_6, function);
12212  }
12213  }
12214  if (!__pyx_t_2) {
12215  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
12216  __Pyx_GOTREF(__pyx_t_1);
12217  } else {
12218  #if CYTHON_FAST_PYCALL
12219  if (PyFunction_Check(__pyx_t_6)) {
12220  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_ci};
12221  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
12222  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12223  __Pyx_GOTREF(__pyx_t_1);
12224  } else
12225  #endif
12226  #if CYTHON_FAST_PYCCALL
12227  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12228  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_ci};
12229  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
12230  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12231  __Pyx_GOTREF(__pyx_t_1);
12232  } else
12233  #endif
12234  {
12235  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 662, __pyx_L1_error)
12236  __Pyx_GOTREF(__pyx_t_8);
12237  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
12238  __Pyx_INCREF(__pyx_v_ci);
12239  __Pyx_GIVEREF(__pyx_v_ci);
12240  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_ci);
12241  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
12242  __Pyx_GOTREF(__pyx_t_1);
12243  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12244  }
12245  }
12246  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12247  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 662, __pyx_L1_error)
12248  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12249  if (__pyx_t_9) {
12250 
12251  /* "ADR.pyx":663
12252  * self.stabilizationIsNonlinear=True
12253  * if coefficients.hamiltonian.has_key(ci):
12254  * for flag in coefficients.hamiltonian[ci].values(): # <<<<<<<<<<<<<<
12255  * if flag == 'nonlinear':
12256  * self.stabilizationIsNonlinear=True
12257  */
12258  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_hamiltonian); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error)
12259  __Pyx_GOTREF(__pyx_t_6);
12260  __pyx_t_8 = PyObject_GetItem(__pyx_t_6, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 663, __pyx_L1_error)
12261  __Pyx_GOTREF(__pyx_t_8);
12262  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12263  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error)
12264  __Pyx_GOTREF(__pyx_t_6);
12265  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12266  __pyx_t_8 = NULL;
12267  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
12268  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
12269  if (likely(__pyx_t_8)) {
12270  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12271  __Pyx_INCREF(__pyx_t_8);
12272  __Pyx_INCREF(function);
12273  __Pyx_DECREF_SET(__pyx_t_6, function);
12274  }
12275  }
12276  if (__pyx_t_8) {
12277  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
12278  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12279  } else {
12280  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
12281  }
12282  __Pyx_GOTREF(__pyx_t_1);
12283  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12284  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
12285  __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0;
12286  __pyx_t_11 = NULL;
12287  } else {
12288  __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error)
12289  __Pyx_GOTREF(__pyx_t_6);
12290  __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 663, __pyx_L1_error)
12291  }
12292  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12293  for (;;) {
12294  if (likely(!__pyx_t_11)) {
12295  if (likely(PyList_CheckExact(__pyx_t_6))) {
12296  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
12297  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12298  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 663, __pyx_L1_error)
12299  #else
12300  __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
12301  __Pyx_GOTREF(__pyx_t_1);
12302  #endif
12303  } else {
12304  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
12305  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12306  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 663, __pyx_L1_error)
12307  #else
12308  __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
12309  __Pyx_GOTREF(__pyx_t_1);
12310  #endif
12311  }
12312  } else {
12313  __pyx_t_1 = __pyx_t_11(__pyx_t_6);
12314  if (unlikely(!__pyx_t_1)) {
12315  PyObject* exc_type = PyErr_Occurred();
12316  if (exc_type) {
12317  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12318  else __PYX_ERR(0, 663, __pyx_L1_error)
12319  }
12320  break;
12321  }
12322  __Pyx_GOTREF(__pyx_t_1);
12323  }
12324  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_1);
12325  __pyx_t_1 = 0;
12326 
12327  /* "ADR.pyx":664
12328  * if coefficients.hamiltonian.has_key(ci):
12329  * for flag in coefficients.hamiltonian[ci].values():
12330  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12331  * self.stabilizationIsNonlinear=True
12332  * #determine if we need element boundary storage
12333  */
12334  __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 664, __pyx_L1_error)
12335  if (__pyx_t_9) {
12336 
12337  /* "ADR.pyx":665
12338  * for flag in coefficients.hamiltonian[ci].values():
12339  * if flag == 'nonlinear':
12340  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
12341  * #determine if we need element boundary storage
12342  * self.elementBoundaryIntegrals = {}
12343  */
12344  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(0, 665, __pyx_L1_error)
12345 
12346  /* "ADR.pyx":664
12347  * if coefficients.hamiltonian.has_key(ci):
12348  * for flag in coefficients.hamiltonian[ci].values():
12349  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12350  * self.stabilizationIsNonlinear=True
12351  * #determine if we need element boundary storage
12352  */
12353  }
12354 
12355  /* "ADR.pyx":663
12356  * self.stabilizationIsNonlinear=True
12357  * if coefficients.hamiltonian.has_key(ci):
12358  * for flag in coefficients.hamiltonian[ci].values(): # <<<<<<<<<<<<<<
12359  * if flag == 'nonlinear':
12360  * self.stabilizationIsNonlinear=True
12361  */
12362  }
12363  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12364 
12365  /* "ADR.pyx":662
12366  * if flag == 'nonlinear':
12367  * self.stabilizationIsNonlinear=True
12368  * if coefficients.hamiltonian.has_key(ci): # <<<<<<<<<<<<<<
12369  * for flag in coefficients.hamiltonian[ci].values():
12370  * if flag == 'nonlinear':
12371  */
12372  }
12373 
12374  /* "ADR.pyx":640
12375  * #cek come back
12376  * if self.stabilization is not None:
12377  * for ci in range(self.nc): # <<<<<<<<<<<<<<
12378  * if coefficients.mass.has_key(ci):
12379  * for flag in coefficients.mass[ci].values():
12380  */
12381  }
12382  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12383 
12384  /* "ADR.pyx":639
12385  * self.stabilizationIsNonlinear = False
12386  * #cek come back
12387  * if self.stabilization is not None: # <<<<<<<<<<<<<<
12388  * for ci in range(self.nc):
12389  * if coefficients.mass.has_key(ci):
12390  */
12391  }
12392 
12393  /* "ADR.pyx":667
12394  * self.stabilizationIsNonlinear=True
12395  * #determine if we need element boundary storage
12396  * self.elementBoundaryIntegrals = {} # <<<<<<<<<<<<<<
12397  * for ci in range(self.nc):
12398  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or
12399  */
12400  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 667, __pyx_L1_error)
12401  __Pyx_GOTREF(__pyx_t_7);
12402  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryIntegrals, __pyx_t_7) < 0) __PYX_ERR(0, 667, __pyx_L1_error)
12403  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12404 
12405  /* "ADR.pyx":668
12406  * #determine if we need element boundary storage
12407  * self.elementBoundaryIntegrals = {}
12408  * for ci in range(self.nc): # <<<<<<<<<<<<<<
12409  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or
12410  * (numericalFluxType is not None) or
12411  */
12412  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error)
12413  __Pyx_GOTREF(__pyx_t_7);
12414  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
12415  __Pyx_GOTREF(__pyx_t_6);
12416  __Pyx_GIVEREF(__pyx_t_7);
12417  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
12418  __pyx_t_7 = 0;
12419  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error)
12420  __Pyx_GOTREF(__pyx_t_7);
12421  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12422  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
12423  __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
12424  __pyx_t_5 = NULL;
12425  } else {
12426  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
12427  __Pyx_GOTREF(__pyx_t_6);
12428  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 668, __pyx_L1_error)
12429  }
12430  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12431  for (;;) {
12432  if (likely(!__pyx_t_5)) {
12433  if (likely(PyList_CheckExact(__pyx_t_6))) {
12434  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
12435  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12436  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 668, __pyx_L1_error)
12437  #else
12438  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error)
12439  __Pyx_GOTREF(__pyx_t_7);
12440  #endif
12441  } else {
12442  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
12443  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12444  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 668, __pyx_L1_error)
12445  #else
12446  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error)
12447  __Pyx_GOTREF(__pyx_t_7);
12448  #endif
12449  }
12450  } else {
12451  __pyx_t_7 = __pyx_t_5(__pyx_t_6);
12452  if (unlikely(!__pyx_t_7)) {
12453  PyObject* exc_type = PyErr_Occurred();
12454  if (exc_type) {
12455  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12456  else __PYX_ERR(0, 668, __pyx_L1_error)
12457  }
12458  break;
12459  }
12460  __Pyx_GOTREF(__pyx_t_7);
12461  }
12462  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_7);
12463  __pyx_t_7 = 0;
12464 
12465  /* "ADR.pyx":669
12466  * self.elementBoundaryIntegrals = {}
12467  * for ci in range(self.nc):
12468  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or # <<<<<<<<<<<<<<
12469  * (numericalFluxType is not None) or
12470  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12471  */
12472  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conservativeFlux); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
12473  __Pyx_GOTREF(__pyx_t_1);
12474  __pyx_t_9 = (__pyx_t_1 != Py_None);
12475  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12476  if (!__pyx_t_9) {
12477  } else {
12478  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
12479  __Pyx_GOTREF(__pyx_t_1);
12480  __pyx_t_7 = __pyx_t_1;
12481  __pyx_t_1 = 0;
12482  goto __pyx_L37_bool_binop_done;
12483  }
12484 
12485  /* "ADR.pyx":670
12486  * for ci in range(self.nc):
12487  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or
12488  * (numericalFluxType is not None) or # <<<<<<<<<<<<<<
12489  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12490  * (self.fluxBoundaryConditions[ci] == 'mixedFlow') or
12491  */
12492  __pyx_t_9 = (__pyx_v_numericalFluxType != Py_None);
12493  if (!__pyx_t_9) {
12494  } else {
12495  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
12496  __Pyx_GOTREF(__pyx_t_1);
12497  __pyx_t_7 = __pyx_t_1;
12498  __pyx_t_1 = 0;
12499  goto __pyx_L37_bool_binop_done;
12500  }
12501 
12502  /* "ADR.pyx":671
12503  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or
12504  * (numericalFluxType is not None) or
12505  * (self.fluxBoundaryConditions[ci] == 'outFlow') or # <<<<<<<<<<<<<<
12506  * (self.fluxBoundaryConditions[ci] == 'mixedFlow') or
12507  * (self.fluxBoundaryConditions[ci] == 'setFlow'))
12508  */
12509  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
12510  __Pyx_GOTREF(__pyx_t_1);
12511  __pyx_t_8 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 671, __pyx_L1_error)
12512  __Pyx_GOTREF(__pyx_t_8);
12513  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12514  __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_n_s_outFlow, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
12515  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12516  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 671, __pyx_L1_error)
12517  if (!__pyx_t_9) {
12518  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12519  } else {
12520  __Pyx_INCREF(__pyx_t_1);
12521  __pyx_t_7 = __pyx_t_1;
12522  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12523  goto __pyx_L37_bool_binop_done;
12524  }
12525 
12526  /* "ADR.pyx":672
12527  * (numericalFluxType is not None) or
12528  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12529  * (self.fluxBoundaryConditions[ci] == 'mixedFlow') or # <<<<<<<<<<<<<<
12530  * (self.fluxBoundaryConditions[ci] == 'setFlow'))
12531  * #
12532  */
12533  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
12534  __Pyx_GOTREF(__pyx_t_1);
12535  __pyx_t_8 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 672, __pyx_L1_error)
12536  __Pyx_GOTREF(__pyx_t_8);
12537  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12538  __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_n_s_mixedFlow, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
12539  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12540  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 672, __pyx_L1_error)
12541  if (!__pyx_t_9) {
12542  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12543  } else {
12544  __Pyx_INCREF(__pyx_t_1);
12545  __pyx_t_7 = __pyx_t_1;
12546  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12547  goto __pyx_L37_bool_binop_done;
12548  }
12549 
12550  /* "ADR.pyx":673
12551  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12552  * (self.fluxBoundaryConditions[ci] == 'mixedFlow') or
12553  * (self.fluxBoundaryConditions[ci] == 'setFlow')) # <<<<<<<<<<<<<<
12554  * #
12555  * #calculate some dimensions
12556  */
12557  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
12558  __Pyx_GOTREF(__pyx_t_1);
12559  __pyx_t_8 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 673, __pyx_L1_error)
12560  __Pyx_GOTREF(__pyx_t_8);
12561  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12562  __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_n_s_setFlow, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
12563  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12564  __Pyx_INCREF(__pyx_t_1);
12565  __pyx_t_7 = __pyx_t_1;
12566  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12567  __pyx_L37_bool_binop_done:;
12568 
12569  /* "ADR.pyx":669
12570  * self.elementBoundaryIntegrals = {}
12571  * for ci in range(self.nc):
12572  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or # <<<<<<<<<<<<<<
12573  * (numericalFluxType is not None) or
12574  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12575  */
12576  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryIntegrals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
12577  __Pyx_GOTREF(__pyx_t_1);
12578  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_ci, __pyx_t_7) < 0)) __PYX_ERR(0, 669, __pyx_L1_error)
12579  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12580  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12581 
12582  /* "ADR.pyx":668
12583  * #determine if we need element boundary storage
12584  * self.elementBoundaryIntegrals = {}
12585  * for ci in range(self.nc): # <<<<<<<<<<<<<<
12586  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or
12587  * (numericalFluxType is not None) or
12588  */
12589  }
12590  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12591 
12592  /* "ADR.pyx":677
12593  * #calculate some dimensions
12594  * #
12595  * self.nSpace_global = self.u[0].femSpace.nSpace_global #assume same space dim for all variables # <<<<<<<<<<<<<<
12596  * self.nDOF_trial_element = [u_j.femSpace.max_nDOF_element for u_j in self.u.values()]
12597  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()]
12598  */
12599  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L1_error)
12600  __Pyx_GOTREF(__pyx_t_6);
12601  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 677, __pyx_L1_error)
12602  __Pyx_GOTREF(__pyx_t_7);
12603  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12604  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L1_error)
12605  __Pyx_GOTREF(__pyx_t_6);
12606  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12607  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 677, __pyx_L1_error)
12608  __Pyx_GOTREF(__pyx_t_7);
12609  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12610  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global, __pyx_t_7) < 0) __PYX_ERR(0, 677, __pyx_L1_error)
12611  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12612 
12613  /* "ADR.pyx":678
12614  * #
12615  * self.nSpace_global = self.u[0].femSpace.nSpace_global #assume same space dim for all variables
12616  * self.nDOF_trial_element = [u_j.femSpace.max_nDOF_element for u_j in self.u.values()] # <<<<<<<<<<<<<<
12617  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()]
12618  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()]
12619  */
12620  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
12621  __Pyx_GOTREF(__pyx_t_7);
12622  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
12623  __Pyx_GOTREF(__pyx_t_1);
12624  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 678, __pyx_L1_error)
12625  __Pyx_GOTREF(__pyx_t_8);
12626  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12627  __pyx_t_1 = NULL;
12628  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
12629  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
12630  if (likely(__pyx_t_1)) {
12631  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
12632  __Pyx_INCREF(__pyx_t_1);
12633  __Pyx_INCREF(function);
12634  __Pyx_DECREF_SET(__pyx_t_8, function);
12635  }
12636  }
12637  if (__pyx_t_1) {
12638  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 678, __pyx_L1_error)
12639  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12640  } else {
12641  __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 678, __pyx_L1_error)
12642  }
12643  __Pyx_GOTREF(__pyx_t_6);
12644  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12645  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
12646  __pyx_t_8 = __pyx_t_6; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
12647  __pyx_t_5 = NULL;
12648  } else {
12649  __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 678, __pyx_L1_error)
12650  __Pyx_GOTREF(__pyx_t_8);
12651  __pyx_t_5 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 678, __pyx_L1_error)
12652  }
12653  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12654  for (;;) {
12655  if (likely(!__pyx_t_5)) {
12656  if (likely(PyList_CheckExact(__pyx_t_8))) {
12657  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
12658  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12659  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 678, __pyx_L1_error)
12660  #else
12661  __pyx_t_6 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 678, __pyx_L1_error)
12662  __Pyx_GOTREF(__pyx_t_6);
12663  #endif
12664  } else {
12665  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
12666  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12667  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 678, __pyx_L1_error)
12668  #else
12669  __pyx_t_6 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 678, __pyx_L1_error)
12670  __Pyx_GOTREF(__pyx_t_6);
12671  #endif
12672  }
12673  } else {
12674  __pyx_t_6 = __pyx_t_5(__pyx_t_8);
12675  if (unlikely(!__pyx_t_6)) {
12676  PyObject* exc_type = PyErr_Occurred();
12677  if (exc_type) {
12678  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12679  else __PYX_ERR(0, 678, __pyx_L1_error)
12680  }
12681  break;
12682  }
12683  __Pyx_GOTREF(__pyx_t_6);
12684  }
12685  __Pyx_XDECREF_SET(__pyx_v_u_j, __pyx_t_6);
12686  __pyx_t_6 = 0;
12687  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_u_j, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 678, __pyx_L1_error)
12688  __Pyx_GOTREF(__pyx_t_6);
12689  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_max_nDOF_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
12690  __Pyx_GOTREF(__pyx_t_1);
12691  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12692  if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 678, __pyx_L1_error)
12693  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12694  }
12695  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12696  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_trial_element, __pyx_t_7) < 0) __PYX_ERR(0, 678, __pyx_L1_error)
12697  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12698 
12699  /* "ADR.pyx":679
12700  * self.nSpace_global = self.u[0].femSpace.nSpace_global #assume same space dim for all variables
12701  * self.nDOF_trial_element = [u_j.femSpace.max_nDOF_element for u_j in self.u.values()]
12702  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()] # <<<<<<<<<<<<<<
12703  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()]
12704  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()]
12705  */
12706  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
12707  __Pyx_GOTREF(__pyx_t_7);
12708  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_phi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
12709  __Pyx_GOTREF(__pyx_t_1);
12710  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error)
12711  __Pyx_GOTREF(__pyx_t_6);
12712  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12713  __pyx_t_1 = NULL;
12714  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
12715  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
12716  if (likely(__pyx_t_1)) {
12717  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12718  __Pyx_INCREF(__pyx_t_1);
12719  __Pyx_INCREF(function);
12720  __Pyx_DECREF_SET(__pyx_t_6, function);
12721  }
12722  }
12723  if (__pyx_t_1) {
12724  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 679, __pyx_L1_error)
12725  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12726  } else {
12727  __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 679, __pyx_L1_error)
12728  }
12729  __Pyx_GOTREF(__pyx_t_8);
12730  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12731  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
12732  __pyx_t_6 = __pyx_t_8; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
12733  __pyx_t_5 = NULL;
12734  } else {
12735  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error)
12736  __Pyx_GOTREF(__pyx_t_6);
12737  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 679, __pyx_L1_error)
12738  }
12739  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12740  for (;;) {
12741  if (likely(!__pyx_t_5)) {
12742  if (likely(PyList_CheckExact(__pyx_t_6))) {
12743  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
12744  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12745  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
12746  #else
12747  __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 679, __pyx_L1_error)
12748  __Pyx_GOTREF(__pyx_t_8);
12749  #endif
12750  } else {
12751  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
12752  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12753  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
12754  #else
12755  __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 679, __pyx_L1_error)
12756  __Pyx_GOTREF(__pyx_t_8);
12757  #endif
12758  }
12759  } else {
12760  __pyx_t_8 = __pyx_t_5(__pyx_t_6);
12761  if (unlikely(!__pyx_t_8)) {
12762  PyObject* exc_type = PyErr_Occurred();
12763  if (exc_type) {
12764  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12765  else __PYX_ERR(0, 679, __pyx_L1_error)
12766  }
12767  break;
12768  }
12769  __Pyx_GOTREF(__pyx_t_8);
12770  }
12771  __Pyx_XDECREF_SET(__pyx_v_phi_k, __pyx_t_8);
12772  __pyx_t_8 = 0;
12773  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_phi_k, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 679, __pyx_L1_error)
12774  __Pyx_GOTREF(__pyx_t_8);
12775  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_max_nDOF_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
12776  __Pyx_GOTREF(__pyx_t_1);
12777  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12778  if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 679, __pyx_L1_error)
12779  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12780  }
12781  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12782  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_phi_trial_element, __pyx_t_7) < 0) __PYX_ERR(0, 679, __pyx_L1_error)
12783  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12784 
12785  /* "ADR.pyx":680
12786  * self.nDOF_trial_element = [u_j.femSpace.max_nDOF_element for u_j in self.u.values()]
12787  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()]
12788  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()] # <<<<<<<<<<<<<<
12789  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()]
12790  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()]
12791  */
12792  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error)
12793  __Pyx_GOTREF(__pyx_t_7);
12794  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_phi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
12795  __Pyx_GOTREF(__pyx_t_1);
12796  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 680, __pyx_L1_error)
12797  __Pyx_GOTREF(__pyx_t_8);
12798  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12799  __pyx_t_1 = NULL;
12800  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
12801  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
12802  if (likely(__pyx_t_1)) {
12803  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
12804  __Pyx_INCREF(__pyx_t_1);
12805  __Pyx_INCREF(function);
12806  __Pyx_DECREF_SET(__pyx_t_8, function);
12807  }
12808  }
12809  if (__pyx_t_1) {
12810  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error)
12811  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12812  } else {
12813  __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error)
12814  }
12815  __Pyx_GOTREF(__pyx_t_6);
12816  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12817  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
12818  __pyx_t_8 = __pyx_t_6; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
12819  __pyx_t_5 = NULL;
12820  } else {
12821  __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 680, __pyx_L1_error)
12822  __Pyx_GOTREF(__pyx_t_8);
12823  __pyx_t_5 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 680, __pyx_L1_error)
12824  }
12825  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12826  for (;;) {
12827  if (likely(!__pyx_t_5)) {
12828  if (likely(PyList_CheckExact(__pyx_t_8))) {
12829  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
12830  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12831  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 680, __pyx_L1_error)
12832  #else
12833  __pyx_t_6 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error)
12834  __Pyx_GOTREF(__pyx_t_6);
12835  #endif
12836  } else {
12837  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
12838  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12839  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 680, __pyx_L1_error)
12840  #else
12841  __pyx_t_6 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error)
12842  __Pyx_GOTREF(__pyx_t_6);
12843  #endif
12844  }
12845  } else {
12846  __pyx_t_6 = __pyx_t_5(__pyx_t_8);
12847  if (unlikely(!__pyx_t_6)) {
12848  PyObject* exc_type = PyErr_Occurred();
12849  if (exc_type) {
12850  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12851  else __PYX_ERR(0, 680, __pyx_L1_error)
12852  }
12853  break;
12854  }
12855  __Pyx_GOTREF(__pyx_t_6);
12856  }
12857  __Pyx_XDECREF_SET(__pyx_v_phi_k, __pyx_t_6);
12858  __pyx_t_6 = 0;
12859  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_phi_k, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error)
12860  __Pyx_GOTREF(__pyx_t_6);
12861  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_referenceFiniteElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
12862  __Pyx_GOTREF(__pyx_t_1);
12863  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12864  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_interpolationConditions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error)
12865  __Pyx_GOTREF(__pyx_t_6);
12866  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12867  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nQuadraturePoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
12868  __Pyx_GOTREF(__pyx_t_1);
12869  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12870  if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 680, __pyx_L1_error)
12871  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12872  }
12873  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12874  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_n_phi_ip_element, __pyx_t_7) < 0) __PYX_ERR(0, 680, __pyx_L1_error)
12875  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12876 
12877  /* "ADR.pyx":681
12878  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()]
12879  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()]
12880  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()] # <<<<<<<<<<<<<<
12881  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()]
12882  * self.nVDOF_element = sum(self.nDOF_trial_element)
12883  */
12884  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 681, __pyx_L1_error)
12885  __Pyx_GOTREF(__pyx_t_7);
12886  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_testSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
12887  __Pyx_GOTREF(__pyx_t_1);
12888  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 681, __pyx_L1_error)
12889  __Pyx_GOTREF(__pyx_t_6);
12890  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12891  __pyx_t_1 = NULL;
12892  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
12893  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
12894  if (likely(__pyx_t_1)) {
12895  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12896  __Pyx_INCREF(__pyx_t_1);
12897  __Pyx_INCREF(function);
12898  __Pyx_DECREF_SET(__pyx_t_6, function);
12899  }
12900  }
12901  if (__pyx_t_1) {
12902  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 681, __pyx_L1_error)
12903  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12904  } else {
12905  __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 681, __pyx_L1_error)
12906  }
12907  __Pyx_GOTREF(__pyx_t_8);
12908  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12909  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
12910  __pyx_t_6 = __pyx_t_8; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
12911  __pyx_t_5 = NULL;
12912  } else {
12913  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 681, __pyx_L1_error)
12914  __Pyx_GOTREF(__pyx_t_6);
12915  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 681, __pyx_L1_error)
12916  }
12917  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12918  for (;;) {
12919  if (likely(!__pyx_t_5)) {
12920  if (likely(PyList_CheckExact(__pyx_t_6))) {
12921  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
12922  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12923  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 681, __pyx_L1_error)
12924  #else
12925  __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 681, __pyx_L1_error)
12926  __Pyx_GOTREF(__pyx_t_8);
12927  #endif
12928  } else {
12929  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
12930  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12931  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 681, __pyx_L1_error)
12932  #else
12933  __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 681, __pyx_L1_error)
12934  __Pyx_GOTREF(__pyx_t_8);
12935  #endif
12936  }
12937  } else {
12938  __pyx_t_8 = __pyx_t_5(__pyx_t_6);
12939  if (unlikely(!__pyx_t_8)) {
12940  PyObject* exc_type = PyErr_Occurred();
12941  if (exc_type) {
12942  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12943  else __PYX_ERR(0, 681, __pyx_L1_error)
12944  }
12945  break;
12946  }
12947  __Pyx_GOTREF(__pyx_t_8);
12948  }
12949  __Pyx_XDECREF_SET(__pyx_v_femSpace, __pyx_t_8);
12950  __pyx_t_8 = 0;
12951  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_max_nDOF_element); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 681, __pyx_L1_error)
12952  __Pyx_GOTREF(__pyx_t_8);
12953  if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 681, __pyx_L1_error)
12954  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12955  }
12956  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12957  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_test_element, __pyx_t_7) < 0) __PYX_ERR(0, 681, __pyx_L1_error)
12958  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12959 
12960  /* "ADR.pyx":682
12961  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()]
12962  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()]
12963  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()] # <<<<<<<<<<<<<<
12964  * self.nVDOF_element = sum(self.nDOF_trial_element)
12965  * self.nFreeVDOF_global = sum(self.nFreeDOF_global)
12966  */
12967  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error)
12968  __Pyx_GOTREF(__pyx_t_7);
12969  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dirichletConditions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 682, __pyx_L1_error)
12970  __Pyx_GOTREF(__pyx_t_8);
12971  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error)
12972  __Pyx_GOTREF(__pyx_t_1);
12973  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12974  __pyx_t_8 = NULL;
12975  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
12976  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
12977  if (likely(__pyx_t_8)) {
12978  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
12979  __Pyx_INCREF(__pyx_t_8);
12980  __Pyx_INCREF(function);
12981  __Pyx_DECREF_SET(__pyx_t_1, function);
12982  }
12983  }
12984  if (__pyx_t_8) {
12985  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error)
12986  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12987  } else {
12988  __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error)
12989  }
12990  __Pyx_GOTREF(__pyx_t_6);
12991  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12992  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
12993  __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
12994  __pyx_t_5 = NULL;
12995  } else {
12996  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error)
12997  __Pyx_GOTREF(__pyx_t_1);
12998  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 682, __pyx_L1_error)
12999  }
13000  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13001  for (;;) {
13002  if (likely(!__pyx_t_5)) {
13003  if (likely(PyList_CheckExact(__pyx_t_1))) {
13004  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
13005  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13006  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 682, __pyx_L1_error)
13007  #else
13008  __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error)
13009  __Pyx_GOTREF(__pyx_t_6);
13010  #endif
13011  } else {
13012  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
13013  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13014  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 682, __pyx_L1_error)
13015  #else
13016  __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error)
13017  __Pyx_GOTREF(__pyx_t_6);
13018  #endif
13019  }
13020  } else {
13021  __pyx_t_6 = __pyx_t_5(__pyx_t_1);
13022  if (unlikely(!__pyx_t_6)) {
13023  PyObject* exc_type = PyErr_Occurred();
13024  if (exc_type) {
13025  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13026  else __PYX_ERR(0, 682, __pyx_L1_error)
13027  }
13028  break;
13029  }
13030  __Pyx_GOTREF(__pyx_t_6);
13031  }
13032  __Pyx_XDECREF_SET(__pyx_v_dc, __pyx_t_6);
13033  __pyx_t_6 = 0;
13034  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dc, __pyx_n_s_nFreeDOF_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error)
13035  __Pyx_GOTREF(__pyx_t_6);
13036  if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 682, __pyx_L1_error)
13037  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13038  }
13039  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13040  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nFreeDOF_global, __pyx_t_7) < 0) __PYX_ERR(0, 682, __pyx_L1_error)
13041  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13042 
13043  /* "ADR.pyx":683
13044  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()]
13045  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()]
13046  * self.nVDOF_element = sum(self.nDOF_trial_element) # <<<<<<<<<<<<<<
13047  * self.nFreeVDOF_global = sum(self.nFreeDOF_global)
13048  * #
13049  */
13050  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 683, __pyx_L1_error)
13051  __Pyx_GOTREF(__pyx_t_7);
13052  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
13053  __Pyx_GOTREF(__pyx_t_1);
13054  __Pyx_GIVEREF(__pyx_t_7);
13055  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
13056  __pyx_t_7 = 0;
13057  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 683, __pyx_L1_error)
13058  __Pyx_GOTREF(__pyx_t_7);
13059  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13060  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nVDOF_element, __pyx_t_7) < 0) __PYX_ERR(0, 683, __pyx_L1_error)
13061  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13062 
13063  /* "ADR.pyx":684
13064  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()]
13065  * self.nVDOF_element = sum(self.nDOF_trial_element)
13066  * self.nFreeVDOF_global = sum(self.nFreeDOF_global) # <<<<<<<<<<<<<<
13067  * #
13068  * NonlinearEquation.__init__(self,self.nFreeVDOF_global)
13069  */
13070  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nFreeDOF_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 684, __pyx_L1_error)
13071  __Pyx_GOTREF(__pyx_t_7);
13072  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
13073  __Pyx_GOTREF(__pyx_t_1);
13074  __Pyx_GIVEREF(__pyx_t_7);
13075  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
13076  __pyx_t_7 = 0;
13077  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 684, __pyx_L1_error)
13078  __Pyx_GOTREF(__pyx_t_7);
13079  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13080  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nFreeVDOF_global, __pyx_t_7) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
13081  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13082 
13083  /* "ADR.pyx":686
13084  * self.nFreeVDOF_global = sum(self.nFreeDOF_global)
13085  * #
13086  * NonlinearEquation.__init__(self,self.nFreeVDOF_global) # <<<<<<<<<<<<<<
13087  * #
13088  * #build the quadrature point dictionaries from the input (this
13089  */
13090  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NonlinearEquation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
13091  __Pyx_GOTREF(__pyx_t_1);
13092  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error)
13093  __Pyx_GOTREF(__pyx_t_6);
13094  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13095  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nFreeVDOF_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
13096  __Pyx_GOTREF(__pyx_t_1);
13097  __pyx_t_8 = NULL;
13098  __pyx_t_14 = 0;
13099  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13100  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
13101  if (likely(__pyx_t_8)) {
13102  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13103  __Pyx_INCREF(__pyx_t_8);
13104  __Pyx_INCREF(function);
13105  __Pyx_DECREF_SET(__pyx_t_6, function);
13106  __pyx_t_14 = 1;
13107  }
13108  }
13109  #if CYTHON_FAST_PYCALL
13110  if (PyFunction_Check(__pyx_t_6)) {
13111  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self, __pyx_t_1};
13112  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 686, __pyx_L1_error)
13113  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13114  __Pyx_GOTREF(__pyx_t_7);
13115  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13116  } else
13117  #endif
13118  #if CYTHON_FAST_PYCCALL
13119  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
13120  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self, __pyx_t_1};
13121  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 686, __pyx_L1_error)
13122  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13123  __Pyx_GOTREF(__pyx_t_7);
13124  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13125  } else
13126  #endif
13127  {
13128  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
13129  __Pyx_GOTREF(__pyx_t_2);
13130  if (__pyx_t_8) {
13131  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
13132  }
13133  __Pyx_INCREF(__pyx_v_self);
13134  __Pyx_GIVEREF(__pyx_v_self);
13135  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_v_self);
13136  __Pyx_GIVEREF(__pyx_t_1);
13137  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_t_1);
13138  __pyx_t_1 = 0;
13139  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 686, __pyx_L1_error)
13140  __Pyx_GOTREF(__pyx_t_7);
13141  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13142  }
13143  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13144  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13145 
13146  /* "ADR.pyx":692
13147  * #complete)
13148  * #
13149  * elementQuadratureDict={} # <<<<<<<<<<<<<<
13150  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13151  * if elemQuadIsDict: #set terms manually
13152  */
13153  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 692, __pyx_L1_error)
13154  __Pyx_GOTREF(__pyx_t_7);
13155  __pyx_v_elementQuadratureDict = ((PyObject*)__pyx_t_7);
13156  __pyx_t_7 = 0;
13157 
13158  /* "ADR.pyx":693
13159  * #
13160  * elementQuadratureDict={}
13161  * elemQuadIsDict = isinstance(elementQuadrature,dict) # <<<<<<<<<<<<<<
13162  * if elemQuadIsDict: #set terms manually
13163  * for I in self.coefficients.elementIntegralKeys:
13164  */
13165  __pyx_t_9 = PyDict_Check(__pyx_v_elementQuadrature);
13166  __pyx_v_elemQuadIsDict = __pyx_t_9;
13167 
13168  /* "ADR.pyx":694
13169  * elementQuadratureDict={}
13170  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13171  * if elemQuadIsDict: #set terms manually # <<<<<<<<<<<<<<
13172  * for I in self.coefficients.elementIntegralKeys:
13173  * if elementQuadrature.has_key(I):
13174  */
13175  __pyx_t_9 = (__pyx_v_elemQuadIsDict != 0);
13176  if (__pyx_t_9) {
13177 
13178  /* "ADR.pyx":695
13179  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13180  * if elemQuadIsDict: #set terms manually
13181  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13182  * if elementQuadrature.has_key(I):
13183  * elementQuadratureDict[I] = elementQuadrature[I]
13184  */
13185  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
13186  __Pyx_GOTREF(__pyx_t_7);
13187  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
13188  __Pyx_GOTREF(__pyx_t_6);
13189  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13190  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
13191  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
13192  __pyx_t_5 = NULL;
13193  } else {
13194  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
13195  __Pyx_GOTREF(__pyx_t_7);
13196  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 695, __pyx_L1_error)
13197  }
13198  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13199  for (;;) {
13200  if (likely(!__pyx_t_5)) {
13201  if (likely(PyList_CheckExact(__pyx_t_7))) {
13202  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
13203  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13204  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 695, __pyx_L1_error)
13205  #else
13206  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
13207  __Pyx_GOTREF(__pyx_t_6);
13208  #endif
13209  } else {
13210  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
13211  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13212  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 695, __pyx_L1_error)
13213  #else
13214  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
13215  __Pyx_GOTREF(__pyx_t_6);
13216  #endif
13217  }
13218  } else {
13219  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
13220  if (unlikely(!__pyx_t_6)) {
13221  PyObject* exc_type = PyErr_Occurred();
13222  if (exc_type) {
13223  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13224  else __PYX_ERR(0, 695, __pyx_L1_error)
13225  }
13226  break;
13227  }
13228  __Pyx_GOTREF(__pyx_t_6);
13229  }
13230  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
13231  __pyx_t_6 = 0;
13232 
13233  /* "ADR.pyx":696
13234  * if elemQuadIsDict: #set terms manually
13235  * for I in self.coefficients.elementIntegralKeys:
13236  * if elementQuadrature.has_key(I): # <<<<<<<<<<<<<<
13237  * elementQuadratureDict[I] = elementQuadrature[I]
13238  * else:
13239  */
13240  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_elementQuadrature, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
13241  __Pyx_GOTREF(__pyx_t_2);
13242  __pyx_t_1 = NULL;
13243  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
13244  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
13245  if (likely(__pyx_t_1)) {
13246  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
13247  __Pyx_INCREF(__pyx_t_1);
13248  __Pyx_INCREF(function);
13249  __Pyx_DECREF_SET(__pyx_t_2, function);
13250  }
13251  }
13252  if (!__pyx_t_1) {
13253  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 696, __pyx_L1_error)
13254  __Pyx_GOTREF(__pyx_t_6);
13255  } else {
13256  #if CYTHON_FAST_PYCALL
13257  if (PyFunction_Check(__pyx_t_2)) {
13258  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_I};
13259  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 696, __pyx_L1_error)
13260  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13261  __Pyx_GOTREF(__pyx_t_6);
13262  } else
13263  #endif
13264  #if CYTHON_FAST_PYCCALL
13265  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
13266  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_I};
13267  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 696, __pyx_L1_error)
13268  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13269  __Pyx_GOTREF(__pyx_t_6);
13270  } else
13271  #endif
13272  {
13273  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 696, __pyx_L1_error)
13274  __Pyx_GOTREF(__pyx_t_8);
13275  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
13276  __Pyx_INCREF(__pyx_v_I);
13277  __Pyx_GIVEREF(__pyx_v_I);
13278  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_I);
13279  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 696, __pyx_L1_error)
13280  __Pyx_GOTREF(__pyx_t_6);
13281  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13282  }
13283  }
13284  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13285  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 696, __pyx_L1_error)
13286  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13287  if (__pyx_t_9) {
13288 
13289  /* "ADR.pyx":697
13290  * for I in self.coefficients.elementIntegralKeys:
13291  * if elementQuadrature.has_key(I):
13292  * elementQuadratureDict[I] = elementQuadrature[I] # <<<<<<<<<<<<<<
13293  * else:
13294  * elementQuadratureDict[I] = elementQuadrature['default']
13295  */
13296  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 697, __pyx_L1_error)
13297  __Pyx_GOTREF(__pyx_t_6);
13298  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_v_I, __pyx_t_6) < 0)) __PYX_ERR(0, 697, __pyx_L1_error)
13299  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13300 
13301  /* "ADR.pyx":696
13302  * if elemQuadIsDict: #set terms manually
13303  * for I in self.coefficients.elementIntegralKeys:
13304  * if elementQuadrature.has_key(I): # <<<<<<<<<<<<<<
13305  * elementQuadratureDict[I] = elementQuadrature[I]
13306  * else:
13307  */
13308  goto __pyx_L55;
13309  }
13310 
13311  /* "ADR.pyx":699
13312  * elementQuadratureDict[I] = elementQuadrature[I]
13313  * else:
13314  * elementQuadratureDict[I] = elementQuadrature['default'] # <<<<<<<<<<<<<<
13315  * else:
13316  * for I in self.coefficients.elementIntegralKeys:
13317  */
13318  /*else*/ {
13319  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_n_s_default); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 699, __pyx_L1_error)
13320  __Pyx_GOTREF(__pyx_t_6);
13321  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_v_I, __pyx_t_6) < 0)) __PYX_ERR(0, 699, __pyx_L1_error)
13322  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13323  }
13324  __pyx_L55:;
13325 
13326  /* "ADR.pyx":695
13327  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13328  * if elemQuadIsDict: #set terms manually
13329  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13330  * if elementQuadrature.has_key(I):
13331  * elementQuadratureDict[I] = elementQuadrature[I]
13332  */
13333  }
13334  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13335 
13336  /* "ADR.pyx":694
13337  * elementQuadratureDict={}
13338  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13339  * if elemQuadIsDict: #set terms manually # <<<<<<<<<<<<<<
13340  * for I in self.coefficients.elementIntegralKeys:
13341  * if elementQuadrature.has_key(I):
13342  */
13343  goto __pyx_L52;
13344  }
13345 
13346  /* "ADR.pyx":701
13347  * elementQuadratureDict[I] = elementQuadrature['default']
13348  * else:
13349  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13350  * elementQuadratureDict[I] = elementQuadrature
13351  * if self.stabilization is not None:
13352  */
13353  /*else*/ {
13354  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 701, __pyx_L1_error)
13355  __Pyx_GOTREF(__pyx_t_7);
13356  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
13357  __Pyx_GOTREF(__pyx_t_6);
13358  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13359  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
13360  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
13361  __pyx_t_5 = NULL;
13362  } else {
13363  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 701, __pyx_L1_error)
13364  __Pyx_GOTREF(__pyx_t_7);
13365  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 701, __pyx_L1_error)
13366  }
13367  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13368  for (;;) {
13369  if (likely(!__pyx_t_5)) {
13370  if (likely(PyList_CheckExact(__pyx_t_7))) {
13371  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
13372  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13373  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 701, __pyx_L1_error)
13374  #else
13375  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
13376  __Pyx_GOTREF(__pyx_t_6);
13377  #endif
13378  } else {
13379  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
13380  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13381  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 701, __pyx_L1_error)
13382  #else
13383  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
13384  __Pyx_GOTREF(__pyx_t_6);
13385  #endif
13386  }
13387  } else {
13388  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
13389  if (unlikely(!__pyx_t_6)) {
13390  PyObject* exc_type = PyErr_Occurred();
13391  if (exc_type) {
13392  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13393  else __PYX_ERR(0, 701, __pyx_L1_error)
13394  }
13395  break;
13396  }
13397  __Pyx_GOTREF(__pyx_t_6);
13398  }
13399  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
13400  __pyx_t_6 = 0;
13401 
13402  /* "ADR.pyx":702
13403  * else:
13404  * for I in self.coefficients.elementIntegralKeys:
13405  * elementQuadratureDict[I] = elementQuadrature # <<<<<<<<<<<<<<
13406  * if self.stabilization is not None:
13407  * for I in self.coefficients.elementIntegralKeys:
13408  */
13409  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_v_I, __pyx_v_elementQuadrature) < 0)) __PYX_ERR(0, 702, __pyx_L1_error)
13410 
13411  /* "ADR.pyx":701
13412  * elementQuadratureDict[I] = elementQuadrature['default']
13413  * else:
13414  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13415  * elementQuadratureDict[I] = elementQuadrature
13416  * if self.stabilization is not None:
13417  */
13418  }
13419  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13420  }
13421  __pyx_L52:;
13422 
13423  /* "ADR.pyx":703
13424  * for I in self.coefficients.elementIntegralKeys:
13425  * elementQuadratureDict[I] = elementQuadrature
13426  * if self.stabilization is not None: # <<<<<<<<<<<<<<
13427  * for I in self.coefficients.elementIntegralKeys:
13428  * if elemQuadIsDict:
13429  */
13430  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 703, __pyx_L1_error)
13431  __Pyx_GOTREF(__pyx_t_7);
13432  __pyx_t_9 = (__pyx_t_7 != Py_None);
13433  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13434  __pyx_t_3 = (__pyx_t_9 != 0);
13435  if (__pyx_t_3) {
13436 
13437  /* "ADR.pyx":704
13438  * elementQuadratureDict[I] = elementQuadrature
13439  * if self.stabilization is not None:
13440  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13441  * if elemQuadIsDict:
13442  * if elementQuadrature.has_key(I):
13443  */
13444  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 704, __pyx_L1_error)
13445  __Pyx_GOTREF(__pyx_t_7);
13446  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error)
13447  __Pyx_GOTREF(__pyx_t_6);
13448  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13449  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
13450  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
13451  __pyx_t_5 = NULL;
13452  } else {
13453  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 704, __pyx_L1_error)
13454  __Pyx_GOTREF(__pyx_t_7);
13455  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 704, __pyx_L1_error)
13456  }
13457  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13458  for (;;) {
13459  if (likely(!__pyx_t_5)) {
13460  if (likely(PyList_CheckExact(__pyx_t_7))) {
13461  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
13462  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13463  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 704, __pyx_L1_error)
13464  #else
13465  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error)
13466  __Pyx_GOTREF(__pyx_t_6);
13467  #endif
13468  } else {
13469  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
13470  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13471  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 704, __pyx_L1_error)
13472  #else
13473  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error)
13474  __Pyx_GOTREF(__pyx_t_6);
13475  #endif
13476  }
13477  } else {
13478  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
13479  if (unlikely(!__pyx_t_6)) {
13480  PyObject* exc_type = PyErr_Occurred();
13481  if (exc_type) {
13482  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13483  else __PYX_ERR(0, 704, __pyx_L1_error)
13484  }
13485  break;
13486  }
13487  __Pyx_GOTREF(__pyx_t_6);
13488  }
13489  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
13490  __pyx_t_6 = 0;
13491 
13492  /* "ADR.pyx":705
13493  * if self.stabilization is not None:
13494  * for I in self.coefficients.elementIntegralKeys:
13495  * if elemQuadIsDict: # <<<<<<<<<<<<<<
13496  * if elementQuadrature.has_key(I):
13497  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13498  */
13499  __pyx_t_3 = (__pyx_v_elemQuadIsDict != 0);
13500  if (__pyx_t_3) {
13501 
13502  /* "ADR.pyx":706
13503  * for I in self.coefficients.elementIntegralKeys:
13504  * if elemQuadIsDict:
13505  * if elementQuadrature.has_key(I): # <<<<<<<<<<<<<<
13506  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13507  * else:
13508  */
13509  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_elementQuadrature, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error)
13510  __Pyx_GOTREF(__pyx_t_2);
13511  __pyx_t_8 = NULL;
13512  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
13513  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
13514  if (likely(__pyx_t_8)) {
13515  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
13516  __Pyx_INCREF(__pyx_t_8);
13517  __Pyx_INCREF(function);
13518  __Pyx_DECREF_SET(__pyx_t_2, function);
13519  }
13520  }
13521  if (!__pyx_t_8) {
13522  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error)
13523  __Pyx_GOTREF(__pyx_t_6);
13524  } else {
13525  #if CYTHON_FAST_PYCALL
13526  if (PyFunction_Check(__pyx_t_2)) {
13527  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_I};
13528  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error)
13529  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13530  __Pyx_GOTREF(__pyx_t_6);
13531  } else
13532  #endif
13533  #if CYTHON_FAST_PYCCALL
13534  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
13535  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_I};
13536  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error)
13537  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13538  __Pyx_GOTREF(__pyx_t_6);
13539  } else
13540  #endif
13541  {
13542  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
13543  __Pyx_GOTREF(__pyx_t_1);
13544  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __pyx_t_8 = NULL;
13545  __Pyx_INCREF(__pyx_v_I);
13546  __Pyx_GIVEREF(__pyx_v_I);
13547  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_I);
13548  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error)
13549  __Pyx_GOTREF(__pyx_t_6);
13550  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13551  }
13552  }
13553  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13554  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 706, __pyx_L1_error)
13555  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13556  if (__pyx_t_3) {
13557 
13558  /* "ADR.pyx":707
13559  * if elemQuadIsDict:
13560  * if elementQuadrature.has_key(I):
13561  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I] # <<<<<<<<<<<<<<
13562  * else:
13563  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default']
13564  */
13565  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 707, __pyx_L1_error)
13566  __Pyx_GOTREF(__pyx_t_6);
13567  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
13568  __Pyx_GOTREF(__pyx_t_2);
13569  __pyx_t_1 = PyNumber_Add(__pyx_tuple__17, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error)
13570  __Pyx_GOTREF(__pyx_t_1);
13571  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13572  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_1, __pyx_t_6) < 0)) __PYX_ERR(0, 707, __pyx_L1_error)
13573  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13574  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13575 
13576  /* "ADR.pyx":706
13577  * for I in self.coefficients.elementIntegralKeys:
13578  * if elemQuadIsDict:
13579  * if elementQuadrature.has_key(I): # <<<<<<<<<<<<<<
13580  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13581  * else:
13582  */
13583  goto __pyx_L62;
13584  }
13585 
13586  /* "ADR.pyx":709
13587  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13588  * else:
13589  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default'] # <<<<<<<<<<<<<<
13590  * else:
13591  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13592  */
13593  /*else*/ {
13594  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_n_s_default); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 709, __pyx_L1_error)
13595  __Pyx_GOTREF(__pyx_t_6);
13596  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__20, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error)
13597  __Pyx_GOTREF(__pyx_t_1);
13598  __pyx_t_2 = PyNumber_Add(__pyx_tuple__19, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
13599  __Pyx_GOTREF(__pyx_t_2);
13600  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13601  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_2, __pyx_t_6) < 0)) __PYX_ERR(0, 709, __pyx_L1_error)
13602  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13603  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13604  }
13605  __pyx_L62:;
13606 
13607  /* "ADR.pyx":705
13608  * if self.stabilization is not None:
13609  * for I in self.coefficients.elementIntegralKeys:
13610  * if elemQuadIsDict: # <<<<<<<<<<<<<<
13611  * if elementQuadrature.has_key(I):
13612  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13613  */
13614  goto __pyx_L61;
13615  }
13616 
13617  /* "ADR.pyx":711
13618  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default']
13619  * else:
13620  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature # <<<<<<<<<<<<<<
13621  * if self.shockCapturing is not None:
13622  * for ci in self.shockCapturing.components:
13623  */
13624  /*else*/ {
13625  __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__22, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 711, __pyx_L1_error)
13626  __Pyx_GOTREF(__pyx_t_6);
13627  __pyx_t_2 = PyNumber_Add(__pyx_tuple__21, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)
13628  __Pyx_GOTREF(__pyx_t_2);
13629  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13630  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_2, __pyx_v_elementQuadrature) < 0)) __PYX_ERR(0, 711, __pyx_L1_error)
13631  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13632  }
13633  __pyx_L61:;
13634 
13635  /* "ADR.pyx":704
13636  * elementQuadratureDict[I] = elementQuadrature
13637  * if self.stabilization is not None:
13638  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13639  * if elemQuadIsDict:
13640  * if elementQuadrature.has_key(I):
13641  */
13642  }
13643  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13644 
13645  /* "ADR.pyx":703
13646  * for I in self.coefficients.elementIntegralKeys:
13647  * elementQuadratureDict[I] = elementQuadrature
13648  * if self.stabilization is not None: # <<<<<<<<<<<<<<
13649  * for I in self.coefficients.elementIntegralKeys:
13650  * if elemQuadIsDict:
13651  */
13652  }
13653 
13654  /* "ADR.pyx":712
13655  * else:
13656  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13657  * if self.shockCapturing is not None: # <<<<<<<<<<<<<<
13658  * for ci in self.shockCapturing.components:
13659  * if elemQuadIsDict:
13660  */
13661  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 712, __pyx_L1_error)
13662  __Pyx_GOTREF(__pyx_t_7);
13663  __pyx_t_3 = (__pyx_t_7 != Py_None);
13664  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13665  __pyx_t_9 = (__pyx_t_3 != 0);
13666  if (__pyx_t_9) {
13667 
13668  /* "ADR.pyx":713
13669  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13670  * if self.shockCapturing is not None:
13671  * for ci in self.shockCapturing.components: # <<<<<<<<<<<<<<
13672  * if elemQuadIsDict:
13673  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13674  */
13675  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 713, __pyx_L1_error)
13676  __Pyx_GOTREF(__pyx_t_7);
13677  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_components); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
13678  __Pyx_GOTREF(__pyx_t_2);
13679  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13680  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
13681  __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
13682  __pyx_t_5 = NULL;
13683  } else {
13684  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 713, __pyx_L1_error)
13685  __Pyx_GOTREF(__pyx_t_7);
13686  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error)
13687  }
13688  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13689  for (;;) {
13690  if (likely(!__pyx_t_5)) {
13691  if (likely(PyList_CheckExact(__pyx_t_7))) {
13692  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
13693  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13694  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 713, __pyx_L1_error)
13695  #else
13696  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
13697  __Pyx_GOTREF(__pyx_t_2);
13698  #endif
13699  } else {
13700  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
13701  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13702  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 713, __pyx_L1_error)
13703  #else
13704  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
13705  __Pyx_GOTREF(__pyx_t_2);
13706  #endif
13707  }
13708  } else {
13709  __pyx_t_2 = __pyx_t_5(__pyx_t_7);
13710  if (unlikely(!__pyx_t_2)) {
13711  PyObject* exc_type = PyErr_Occurred();
13712  if (exc_type) {
13713  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13714  else __PYX_ERR(0, 713, __pyx_L1_error)
13715  }
13716  break;
13717  }
13718  __Pyx_GOTREF(__pyx_t_2);
13719  }
13720  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_2);
13721  __pyx_t_2 = 0;
13722 
13723  /* "ADR.pyx":714
13724  * if self.shockCapturing is not None:
13725  * for ci in self.shockCapturing.components:
13726  * if elemQuadIsDict: # <<<<<<<<<<<<<<
13727  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13728  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13729  */
13730  __pyx_t_9 = (__pyx_v_elemQuadIsDict != 0);
13731  if (__pyx_t_9) {
13732 
13733  /* "ADR.pyx":715
13734  * for ci in self.shockCapturing.components:
13735  * if elemQuadIsDict:
13736  * if elementQuadrature.has_key(('numDiff',ci,ci)): # <<<<<<<<<<<<<<
13737  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13738  * else:
13739  */
13740  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_elementQuadrature, __pyx_n_s_has_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 715, __pyx_L1_error)
13741  __Pyx_GOTREF(__pyx_t_6);
13742  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)
13743  __Pyx_GOTREF(__pyx_t_1);
13744  __Pyx_INCREF(__pyx_n_s_numDiff);
13745  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13746  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_numDiff);
13747  __Pyx_INCREF(__pyx_v_ci);
13748  __Pyx_GIVEREF(__pyx_v_ci);
13749  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
13750  __Pyx_INCREF(__pyx_v_ci);
13751  __Pyx_GIVEREF(__pyx_v_ci);
13752  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_ci);
13753  __pyx_t_8 = NULL;
13754  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
13755  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
13756  if (likely(__pyx_t_8)) {
13757  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13758  __Pyx_INCREF(__pyx_t_8);
13759  __Pyx_INCREF(function);
13760  __Pyx_DECREF_SET(__pyx_t_6, function);
13761  }
13762  }
13763  if (!__pyx_t_8) {
13764  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
13765  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13766  __Pyx_GOTREF(__pyx_t_2);
13767  } else {
13768  #if CYTHON_FAST_PYCALL
13769  if (PyFunction_Check(__pyx_t_6)) {
13770  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_1};
13771  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
13772  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13773  __Pyx_GOTREF(__pyx_t_2);
13774  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13775  } else
13776  #endif
13777  #if CYTHON_FAST_PYCCALL
13778  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
13779  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_1};
13780  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
13781  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13782  __Pyx_GOTREF(__pyx_t_2);
13783  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13784  } else
13785  #endif
13786  {
13787  __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 715, __pyx_L1_error)
13788  __Pyx_GOTREF(__pyx_t_15);
13789  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL;
13790  __Pyx_GIVEREF(__pyx_t_1);
13791  PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_1);
13792  __pyx_t_1 = 0;
13793  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
13794  __Pyx_GOTREF(__pyx_t_2);
13795  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
13796  }
13797  }
13798  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13799  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 715, __pyx_L1_error)
13800  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13801  if (__pyx_t_9) {
13802 
13803  /* "ADR.pyx":716
13804  * if elemQuadIsDict:
13805  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13806  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)] # <<<<<<<<<<<<<<
13807  * else:
13808  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature['default']
13809  */
13810  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error)
13811  __Pyx_GOTREF(__pyx_t_2);
13812  __Pyx_INCREF(__pyx_n_s_numDiff);
13813  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13814  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_numDiff);
13815  __Pyx_INCREF(__pyx_v_ci);
13816  __Pyx_GIVEREF(__pyx_v_ci);
13817  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ci);
13818  __Pyx_INCREF(__pyx_v_ci);
13819  __Pyx_GIVEREF(__pyx_v_ci);
13820  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_ci);
13821  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 716, __pyx_L1_error)
13822  __Pyx_GOTREF(__pyx_t_6);
13823  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13824  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error)
13825  __Pyx_GOTREF(__pyx_t_2);
13826  __Pyx_INCREF(__pyx_n_s_numDiff);
13827  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13828  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_numDiff);
13829  __Pyx_INCREF(__pyx_v_ci);
13830  __Pyx_GIVEREF(__pyx_v_ci);
13831  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ci);
13832  __Pyx_INCREF(__pyx_v_ci);
13833  __Pyx_GIVEREF(__pyx_v_ci);
13834  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_ci);
13835  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_2, __pyx_t_6) < 0)) __PYX_ERR(0, 716, __pyx_L1_error)
13836  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13837  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13838 
13839  /* "ADR.pyx":715
13840  * for ci in self.shockCapturing.components:
13841  * if elemQuadIsDict:
13842  * if elementQuadrature.has_key(('numDiff',ci,ci)): # <<<<<<<<<<<<<<
13843  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13844  * else:
13845  */
13846  goto __pyx_L67;
13847  }
13848 
13849  /* "ADR.pyx":718
13850  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13851  * else:
13852  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature['default'] # <<<<<<<<<<<<<<
13853  * else:
13854  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
13855  */
13856  /*else*/ {
13857  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_n_s_default); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 718, __pyx_L1_error)
13858  __Pyx_GOTREF(__pyx_t_6);
13859  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error)
13860  __Pyx_GOTREF(__pyx_t_2);
13861  __Pyx_INCREF(__pyx_n_s_numDiff);
13862  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13863  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_numDiff);
13864  __Pyx_INCREF(__pyx_v_ci);
13865  __Pyx_GIVEREF(__pyx_v_ci);
13866  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ci);
13867  __Pyx_INCREF(__pyx_v_ci);
13868  __Pyx_GIVEREF(__pyx_v_ci);
13869  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_ci);
13870  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_2, __pyx_t_6) < 0)) __PYX_ERR(0, 718, __pyx_L1_error)
13871  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13872  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13873  }
13874  __pyx_L67:;
13875 
13876  /* "ADR.pyx":714
13877  * if self.shockCapturing is not None:
13878  * for ci in self.shockCapturing.components:
13879  * if elemQuadIsDict: # <<<<<<<<<<<<<<
13880  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13881  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13882  */
13883  goto __pyx_L66;
13884  }
13885 
13886  /* "ADR.pyx":720
13887  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature['default']
13888  * else:
13889  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature # <<<<<<<<<<<<<<
13890  * if massLumping:
13891  * for ci in self.coefficients.mass.keys():
13892  */
13893  /*else*/ {
13894  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 720, __pyx_L1_error)
13895  __Pyx_GOTREF(__pyx_t_6);
13896  __Pyx_INCREF(__pyx_n_s_numDiff);
13897  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13898  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_numDiff);
13899  __Pyx_INCREF(__pyx_v_ci);
13900  __Pyx_GIVEREF(__pyx_v_ci);
13901  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
13902  __Pyx_INCREF(__pyx_v_ci);
13903  __Pyx_GIVEREF(__pyx_v_ci);
13904  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ci);
13905  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_6, __pyx_v_elementQuadrature) < 0)) __PYX_ERR(0, 720, __pyx_L1_error)
13906  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13907  }
13908  __pyx_L66:;
13909 
13910  /* "ADR.pyx":713
13911  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13912  * if self.shockCapturing is not None:
13913  * for ci in self.shockCapturing.components: # <<<<<<<<<<<<<<
13914  * if elemQuadIsDict:
13915  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13916  */
13917  }
13918  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13919 
13920  /* "ADR.pyx":712
13921  * else:
13922  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13923  * if self.shockCapturing is not None: # <<<<<<<<<<<<<<
13924  * for ci in self.shockCapturing.components:
13925  * if elemQuadIsDict:
13926  */
13927  }
13928 
13929  /* "ADR.pyx":721
13930  * else:
13931  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
13932  * if massLumping: # <<<<<<<<<<<<<<
13933  * for ci in self.coefficients.mass.keys():
13934  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
13935  */
13936  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_massLumping); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 721, __pyx_L1_error)
13937  if (__pyx_t_9) {
13938 
13939  /* "ADR.pyx":722
13940  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
13941  * if massLumping:
13942  * for ci in self.coefficients.mass.keys(): # <<<<<<<<<<<<<<
13943  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
13944  * for I in self.coefficients.elementIntegralKeys:
13945  */
13946  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 722, __pyx_L1_error)
13947  __Pyx_GOTREF(__pyx_t_6);
13948  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_mass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error)
13949  __Pyx_GOTREF(__pyx_t_2);
13950  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13951  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 722, __pyx_L1_error)
13952  __Pyx_GOTREF(__pyx_t_6);
13953  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13954  __pyx_t_2 = NULL;
13955  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
13956  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
13957  if (likely(__pyx_t_2)) {
13958  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13959  __Pyx_INCREF(__pyx_t_2);
13960  __Pyx_INCREF(function);
13961  __Pyx_DECREF_SET(__pyx_t_6, function);
13962  }
13963  }
13964  if (__pyx_t_2) {
13965  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 722, __pyx_L1_error)
13966  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13967  } else {
13968  __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 722, __pyx_L1_error)
13969  }
13970  __Pyx_GOTREF(__pyx_t_7);
13971  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13972  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
13973  __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
13974  __pyx_t_5 = NULL;
13975  } else {
13976  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 722, __pyx_L1_error)
13977  __Pyx_GOTREF(__pyx_t_6);
13978  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 722, __pyx_L1_error)
13979  }
13980  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13981  for (;;) {
13982  if (likely(!__pyx_t_5)) {
13983  if (likely(PyList_CheckExact(__pyx_t_6))) {
13984  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
13985  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13986  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 722, __pyx_L1_error)
13987  #else
13988  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 722, __pyx_L1_error)
13989  __Pyx_GOTREF(__pyx_t_7);
13990  #endif
13991  } else {
13992  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
13993  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13994  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 722, __pyx_L1_error)
13995  #else
13996  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 722, __pyx_L1_error)
13997  __Pyx_GOTREF(__pyx_t_7);
13998  #endif
13999  }
14000  } else {
14001  __pyx_t_7 = __pyx_t_5(__pyx_t_6);
14002  if (unlikely(!__pyx_t_7)) {
14003  PyObject* exc_type = PyErr_Occurred();
14004  if (exc_type) {
14005  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14006  else __PYX_ERR(0, 722, __pyx_L1_error)
14007  }
14008  break;
14009  }
14010  __Pyx_GOTREF(__pyx_t_7);
14011  }
14012  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_7);
14013  __pyx_t_7 = 0;
14014 
14015  /* "ADR.pyx":723
14016  * if massLumping:
14017  * for ci in self.coefficients.mass.keys():
14018  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
14019  * for I in self.coefficients.elementIntegralKeys:
14020  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14021  */
14022  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Quadrature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
14023  __Pyx_GOTREF(__pyx_t_2);
14024  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SimplexLobattoQuadrature); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 723, __pyx_L1_error)
14025  __Pyx_GOTREF(__pyx_t_15);
14026  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14027  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
14028  __Pyx_GOTREF(__pyx_t_2);
14029  __pyx_t_1 = NULL;
14030  __pyx_t_14 = 0;
14031  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
14032  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_15);
14033  if (likely(__pyx_t_1)) {
14034  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
14035  __Pyx_INCREF(__pyx_t_1);
14036  __Pyx_INCREF(function);
14037  __Pyx_DECREF_SET(__pyx_t_15, function);
14038  __pyx_t_14 = 1;
14039  }
14040  }
14041  #if CYTHON_FAST_PYCALL
14042  if (PyFunction_Check(__pyx_t_15)) {
14043  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_int_1};
14044  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 723, __pyx_L1_error)
14045  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14046  __Pyx_GOTREF(__pyx_t_7);
14047  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14048  } else
14049  #endif
14050  #if CYTHON_FAST_PYCCALL
14051  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
14052  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_int_1};
14053  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 723, __pyx_L1_error)
14054  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14055  __Pyx_GOTREF(__pyx_t_7);
14056  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14057  } else
14058  #endif
14059  {
14060  __pyx_t_8 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 723, __pyx_L1_error)
14061  __Pyx_GOTREF(__pyx_t_8);
14062  if (__pyx_t_1) {
14063  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
14064  }
14065  __Pyx_GIVEREF(__pyx_t_2);
14066  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_14, __pyx_t_2);
14067  __Pyx_INCREF(__pyx_int_1);
14068  __Pyx_GIVEREF(__pyx_int_1);
14069  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_14, __pyx_int_1);
14070  __pyx_t_2 = 0;
14071  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 723, __pyx_L1_error)
14072  __Pyx_GOTREF(__pyx_t_7);
14073  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14074  }
14075  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14076  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 723, __pyx_L1_error)
14077  __Pyx_GOTREF(__pyx_t_15);
14078  __Pyx_INCREF(__pyx_n_s_m);
14079  __Pyx_GIVEREF(__pyx_n_s_m);
14080  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_n_s_m);
14081  __Pyx_INCREF(__pyx_v_ci);
14082  __Pyx_GIVEREF(__pyx_v_ci);
14083  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_v_ci);
14084  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_15, __pyx_t_7) < 0)) __PYX_ERR(0, 723, __pyx_L1_error)
14085  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14086  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14087 
14088  /* "ADR.pyx":722
14089  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
14090  * if massLumping:
14091  * for ci in self.coefficients.mass.keys(): # <<<<<<<<<<<<<<
14092  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14093  * for I in self.coefficients.elementIntegralKeys:
14094  */
14095  }
14096  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14097 
14098  /* "ADR.pyx":724
14099  * for ci in self.coefficients.mass.keys():
14100  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14101  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
14102  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14103  * if reactionLumping:
14104  */
14105  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 724, __pyx_L1_error)
14106  __Pyx_GOTREF(__pyx_t_6);
14107  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 724, __pyx_L1_error)
14108  __Pyx_GOTREF(__pyx_t_7);
14109  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14110  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
14111  __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
14112  __pyx_t_5 = NULL;
14113  } else {
14114  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 724, __pyx_L1_error)
14115  __Pyx_GOTREF(__pyx_t_6);
14116  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 724, __pyx_L1_error)
14117  }
14118  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14119  for (;;) {
14120  if (likely(!__pyx_t_5)) {
14121  if (likely(PyList_CheckExact(__pyx_t_6))) {
14122  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
14123  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14124  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 724, __pyx_L1_error)
14125  #else
14126  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 724, __pyx_L1_error)
14127  __Pyx_GOTREF(__pyx_t_7);
14128  #endif
14129  } else {
14130  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
14131  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14132  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 724, __pyx_L1_error)
14133  #else
14134  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 724, __pyx_L1_error)
14135  __Pyx_GOTREF(__pyx_t_7);
14136  #endif
14137  }
14138  } else {
14139  __pyx_t_7 = __pyx_t_5(__pyx_t_6);
14140  if (unlikely(!__pyx_t_7)) {
14141  PyObject* exc_type = PyErr_Occurred();
14142  if (exc_type) {
14143  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14144  else __PYX_ERR(0, 724, __pyx_L1_error)
14145  }
14146  break;
14147  }
14148  __Pyx_GOTREF(__pyx_t_7);
14149  }
14150  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_7);
14151  __pyx_t_7 = 0;
14152 
14153  /* "ADR.pyx":725
14154  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14155  * for I in self.coefficients.elementIntegralKeys:
14156  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
14157  * if reactionLumping:
14158  * for ci in self.coefficients.mass.keys():
14159  */
14160  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_Quadrature); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 725, __pyx_L1_error)
14161  __Pyx_GOTREF(__pyx_t_15);
14162  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_SimplexLobattoQuadrature); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 725, __pyx_L1_error)
14163  __Pyx_GOTREF(__pyx_t_8);
14164  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14165  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 725, __pyx_L1_error)
14166  __Pyx_GOTREF(__pyx_t_15);
14167  __pyx_t_2 = NULL;
14168  __pyx_t_14 = 0;
14169  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
14170  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
14171  if (likely(__pyx_t_2)) {
14172  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
14173  __Pyx_INCREF(__pyx_t_2);
14174  __Pyx_INCREF(function);
14175  __Pyx_DECREF_SET(__pyx_t_8, function);
14176  __pyx_t_14 = 1;
14177  }
14178  }
14179  #if CYTHON_FAST_PYCALL
14180  if (PyFunction_Check(__pyx_t_8)) {
14181  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_int_1};
14182  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 725, __pyx_L1_error)
14183  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14184  __Pyx_GOTREF(__pyx_t_7);
14185  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14186  } else
14187  #endif
14188  #if CYTHON_FAST_PYCCALL
14189  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
14190  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_int_1};
14191  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 725, __pyx_L1_error)
14192  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14193  __Pyx_GOTREF(__pyx_t_7);
14194  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14195  } else
14196  #endif
14197  {
14198  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error)
14199  __Pyx_GOTREF(__pyx_t_1);
14200  if (__pyx_t_2) {
14201  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
14202  }
14203  __Pyx_GIVEREF(__pyx_t_15);
14204  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_15);
14205  __Pyx_INCREF(__pyx_int_1);
14206  __Pyx_GIVEREF(__pyx_int_1);
14207  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_int_1);
14208  __pyx_t_15 = 0;
14209  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 725, __pyx_L1_error)
14210  __Pyx_GOTREF(__pyx_t_7);
14211  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14212  }
14213  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14214  __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__24, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 725, __pyx_L1_error)
14215  __Pyx_GOTREF(__pyx_t_8);
14216  __pyx_t_1 = PyNumber_Add(__pyx_tuple__23, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error)
14217  __Pyx_GOTREF(__pyx_t_1);
14218  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14219  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_1, __pyx_t_7) < 0)) __PYX_ERR(0, 725, __pyx_L1_error)
14220  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14221  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14222 
14223  /* "ADR.pyx":724
14224  * for ci in self.coefficients.mass.keys():
14225  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14226  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
14227  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14228  * if reactionLumping:
14229  */
14230  }
14231  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14232 
14233  /* "ADR.pyx":721
14234  * else:
14235  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
14236  * if massLumping: # <<<<<<<<<<<<<<
14237  * for ci in self.coefficients.mass.keys():
14238  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14239  */
14240  }
14241 
14242  /* "ADR.pyx":726
14243  * for I in self.coefficients.elementIntegralKeys:
14244  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14245  * if reactionLumping: # <<<<<<<<<<<<<<
14246  * for ci in self.coefficients.mass.keys():
14247  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14248  */
14249  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_reactionLumping); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 726, __pyx_L1_error)
14250  if (__pyx_t_9) {
14251 
14252  /* "ADR.pyx":727
14253  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14254  * if reactionLumping:
14255  * for ci in self.coefficients.mass.keys(): # <<<<<<<<<<<<<<
14256  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14257  * for I in self.coefficients.elementIntegralKeys:
14258  */
14259  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error)
14260  __Pyx_GOTREF(__pyx_t_7);
14261  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_mass); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error)
14262  __Pyx_GOTREF(__pyx_t_1);
14263  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14264  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error)
14265  __Pyx_GOTREF(__pyx_t_7);
14266  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14267  __pyx_t_1 = NULL;
14268  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
14269  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
14270  if (likely(__pyx_t_1)) {
14271  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
14272  __Pyx_INCREF(__pyx_t_1);
14273  __Pyx_INCREF(function);
14274  __Pyx_DECREF_SET(__pyx_t_7, function);
14275  }
14276  }
14277  if (__pyx_t_1) {
14278  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error)
14279  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14280  } else {
14281  __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error)
14282  }
14283  __Pyx_GOTREF(__pyx_t_6);
14284  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14285  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
14286  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
14287  __pyx_t_5 = NULL;
14288  } else {
14289  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error)
14290  __Pyx_GOTREF(__pyx_t_7);
14291  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 727, __pyx_L1_error)
14292  }
14293  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14294  for (;;) {
14295  if (likely(!__pyx_t_5)) {
14296  if (likely(PyList_CheckExact(__pyx_t_7))) {
14297  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
14298  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14299  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 727, __pyx_L1_error)
14300  #else
14301  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error)
14302  __Pyx_GOTREF(__pyx_t_6);
14303  #endif
14304  } else {
14305  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
14306  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14307  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 727, __pyx_L1_error)
14308  #else
14309  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error)
14310  __Pyx_GOTREF(__pyx_t_6);
14311  #endif
14312  }
14313  } else {
14314  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
14315  if (unlikely(!__pyx_t_6)) {
14316  PyObject* exc_type = PyErr_Occurred();
14317  if (exc_type) {
14318  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14319  else __PYX_ERR(0, 727, __pyx_L1_error)
14320  }
14321  break;
14322  }
14323  __Pyx_GOTREF(__pyx_t_6);
14324  }
14325  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_6);
14326  __pyx_t_6 = 0;
14327 
14328  /* "ADR.pyx":728
14329  * if reactionLumping:
14330  * for ci in self.coefficients.mass.keys():
14331  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
14332  * for I in self.coefficients.elementIntegralKeys:
14333  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14334  */
14335  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Quadrature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
14336  __Pyx_GOTREF(__pyx_t_1);
14337  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SimplexLobattoQuadrature); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 728, __pyx_L1_error)
14338  __Pyx_GOTREF(__pyx_t_8);
14339  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14340  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
14341  __Pyx_GOTREF(__pyx_t_1);
14342  __pyx_t_15 = NULL;
14343  __pyx_t_14 = 0;
14344  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
14345  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
14346  if (likely(__pyx_t_15)) {
14347  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
14348  __Pyx_INCREF(__pyx_t_15);
14349  __Pyx_INCREF(function);
14350  __Pyx_DECREF_SET(__pyx_t_8, function);
14351  __pyx_t_14 = 1;
14352  }
14353  }
14354  #if CYTHON_FAST_PYCALL
14355  if (PyFunction_Check(__pyx_t_8)) {
14356  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_1, __pyx_int_1};
14357  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 728, __pyx_L1_error)
14358  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
14359  __Pyx_GOTREF(__pyx_t_6);
14360  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14361  } else
14362  #endif
14363  #if CYTHON_FAST_PYCCALL
14364  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
14365  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_1, __pyx_int_1};
14366  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 728, __pyx_L1_error)
14367  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
14368  __Pyx_GOTREF(__pyx_t_6);
14369  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14370  } else
14371  #endif
14372  {
14373  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error)
14374  __Pyx_GOTREF(__pyx_t_2);
14375  if (__pyx_t_15) {
14376  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15); __pyx_t_15 = NULL;
14377  }
14378  __Pyx_GIVEREF(__pyx_t_1);
14379  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_t_1);
14380  __Pyx_INCREF(__pyx_int_1);
14381  __Pyx_GIVEREF(__pyx_int_1);
14382  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_int_1);
14383  __pyx_t_1 = 0;
14384  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 728, __pyx_L1_error)
14385  __Pyx_GOTREF(__pyx_t_6);
14386  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14387  }
14388  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14389  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 728, __pyx_L1_error)
14390  __Pyx_GOTREF(__pyx_t_8);
14391  __Pyx_INCREF(__pyx_n_s_r);
14392  __Pyx_GIVEREF(__pyx_n_s_r);
14393  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_r);
14394  __Pyx_INCREF(__pyx_v_ci);
14395  __Pyx_GIVEREF(__pyx_v_ci);
14396  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ci);
14397  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_8, __pyx_t_6) < 0)) __PYX_ERR(0, 728, __pyx_L1_error)
14398  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14399  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14400 
14401  /* "ADR.pyx":727
14402  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14403  * if reactionLumping:
14404  * for ci in self.coefficients.mass.keys(): # <<<<<<<<<<<<<<
14405  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14406  * for I in self.coefficients.elementIntegralKeys:
14407  */
14408  }
14409  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14410 
14411  /* "ADR.pyx":729
14412  * for ci in self.coefficients.mass.keys():
14413  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14414  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
14415  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14416  * elementBoundaryQuadratureDict={}
14417  */
14418  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 729, __pyx_L1_error)
14419  __Pyx_GOTREF(__pyx_t_7);
14420  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 729, __pyx_L1_error)
14421  __Pyx_GOTREF(__pyx_t_6);
14422  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14423  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
14424  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
14425  __pyx_t_5 = NULL;
14426  } else {
14427  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 729, __pyx_L1_error)
14428  __Pyx_GOTREF(__pyx_t_7);
14429  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 729, __pyx_L1_error)
14430  }
14431  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14432  for (;;) {
14433  if (likely(!__pyx_t_5)) {
14434  if (likely(PyList_CheckExact(__pyx_t_7))) {
14435  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
14436  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14437  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 729, __pyx_L1_error)
14438  #else
14439  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 729, __pyx_L1_error)
14440  __Pyx_GOTREF(__pyx_t_6);
14441  #endif
14442  } else {
14443  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
14444  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14445  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 729, __pyx_L1_error)
14446  #else
14447  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 729, __pyx_L1_error)
14448  __Pyx_GOTREF(__pyx_t_6);
14449  #endif
14450  }
14451  } else {
14452  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
14453  if (unlikely(!__pyx_t_6)) {
14454  PyObject* exc_type = PyErr_Occurred();
14455  if (exc_type) {
14456  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14457  else __PYX_ERR(0, 729, __pyx_L1_error)
14458  }
14459  break;
14460  }
14461  __Pyx_GOTREF(__pyx_t_6);
14462  }
14463  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
14464  __pyx_t_6 = 0;
14465 
14466  /* "ADR.pyx":730
14467  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14468  * for I in self.coefficients.elementIntegralKeys:
14469  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
14470  * elementBoundaryQuadratureDict={}
14471  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14472  */
14473  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Quadrature); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 730, __pyx_L1_error)
14474  __Pyx_GOTREF(__pyx_t_8);
14475  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_SimplexLobattoQuadrature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error)
14476  __Pyx_GOTREF(__pyx_t_2);
14477  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14478  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 730, __pyx_L1_error)
14479  __Pyx_GOTREF(__pyx_t_8);
14480  __pyx_t_1 = NULL;
14481  __pyx_t_14 = 0;
14482  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
14483  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
14484  if (likely(__pyx_t_1)) {
14485  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
14486  __Pyx_INCREF(__pyx_t_1);
14487  __Pyx_INCREF(function);
14488  __Pyx_DECREF_SET(__pyx_t_2, function);
14489  __pyx_t_14 = 1;
14490  }
14491  }
14492  #if CYTHON_FAST_PYCALL
14493  if (PyFunction_Check(__pyx_t_2)) {
14494  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_8, __pyx_int_1};
14495  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 730, __pyx_L1_error)
14496  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14497  __Pyx_GOTREF(__pyx_t_6);
14498  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14499  } else
14500  #endif
14501  #if CYTHON_FAST_PYCCALL
14502  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
14503  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_8, __pyx_int_1};
14504  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 730, __pyx_L1_error)
14505  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14506  __Pyx_GOTREF(__pyx_t_6);
14507  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14508  } else
14509  #endif
14510  {
14511  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 730, __pyx_L1_error)
14512  __Pyx_GOTREF(__pyx_t_15);
14513  if (__pyx_t_1) {
14514  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __pyx_t_1 = NULL;
14515  }
14516  __Pyx_GIVEREF(__pyx_t_8);
14517  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_8);
14518  __Pyx_INCREF(__pyx_int_1);
14519  __Pyx_GIVEREF(__pyx_int_1);
14520  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_int_1);
14521  __pyx_t_8 = 0;
14522  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 730, __pyx_L1_error)
14523  __Pyx_GOTREF(__pyx_t_6);
14524  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14525  }
14526  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14527  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__26, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error)
14528  __Pyx_GOTREF(__pyx_t_2);
14529  __pyx_t_15 = PyNumber_Add(__pyx_tuple__25, __pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 730, __pyx_L1_error)
14530  __Pyx_GOTREF(__pyx_t_15);
14531  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14532  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_15, __pyx_t_6) < 0)) __PYX_ERR(0, 730, __pyx_L1_error)
14533  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14534  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14535 
14536  /* "ADR.pyx":729
14537  * for ci in self.coefficients.mass.keys():
14538  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14539  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
14540  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14541  * elementBoundaryQuadratureDict={}
14542  */
14543  }
14544  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14545 
14546  /* "ADR.pyx":726
14547  * for I in self.coefficients.elementIntegralKeys:
14548  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14549  * if reactionLumping: # <<<<<<<<<<<<<<
14550  * for ci in self.coefficients.mass.keys():
14551  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14552  */
14553  }
14554 
14555  /* "ADR.pyx":731
14556  * for I in self.coefficients.elementIntegralKeys:
14557  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14558  * elementBoundaryQuadratureDict={} # <<<<<<<<<<<<<<
14559  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14560  * for I in self.coefficients.elementBoundaryIntegralKeys:
14561  */
14562  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 731, __pyx_L1_error)
14563  __Pyx_GOTREF(__pyx_t_7);
14564  __pyx_v_elementBoundaryQuadratureDict = ((PyObject*)__pyx_t_7);
14565  __pyx_t_7 = 0;
14566 
14567  /* "ADR.pyx":732
14568  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14569  * elementBoundaryQuadratureDict={}
14570  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually # <<<<<<<<<<<<<<
14571  * for I in self.coefficients.elementBoundaryIntegralKeys:
14572  * if elementBoundaryQuadrature.has_key(I):
14573  */
14574  __pyx_t_9 = PyDict_Check(__pyx_v_elementBoundaryQuadrature);
14575  __pyx_t_3 = (__pyx_t_9 != 0);
14576  if (__pyx_t_3) {
14577 
14578  /* "ADR.pyx":733
14579  * elementBoundaryQuadratureDict={}
14580  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14581  * for I in self.coefficients.elementBoundaryIntegralKeys: # <<<<<<<<<<<<<<
14582  * if elementBoundaryQuadrature.has_key(I):
14583  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14584  */
14585  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 733, __pyx_L1_error)
14586  __Pyx_GOTREF(__pyx_t_7);
14587  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementBoundaryIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 733, __pyx_L1_error)
14588  __Pyx_GOTREF(__pyx_t_6);
14589  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14590  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
14591  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
14592  __pyx_t_5 = NULL;
14593  } else {
14594  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 733, __pyx_L1_error)
14595  __Pyx_GOTREF(__pyx_t_7);
14596  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 733, __pyx_L1_error)
14597  }
14598  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14599  for (;;) {
14600  if (likely(!__pyx_t_5)) {
14601  if (likely(PyList_CheckExact(__pyx_t_7))) {
14602  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
14603  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14604  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 733, __pyx_L1_error)
14605  #else
14606  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 733, __pyx_L1_error)
14607  __Pyx_GOTREF(__pyx_t_6);
14608  #endif
14609  } else {
14610  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
14611  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14612  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 733, __pyx_L1_error)
14613  #else
14614  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 733, __pyx_L1_error)
14615  __Pyx_GOTREF(__pyx_t_6);
14616  #endif
14617  }
14618  } else {
14619  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
14620  if (unlikely(!__pyx_t_6)) {
14621  PyObject* exc_type = PyErr_Occurred();
14622  if (exc_type) {
14623  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14624  else __PYX_ERR(0, 733, __pyx_L1_error)
14625  }
14626  break;
14627  }
14628  __Pyx_GOTREF(__pyx_t_6);
14629  }
14630  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
14631  __pyx_t_6 = 0;
14632 
14633  /* "ADR.pyx":734
14634  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14635  * for I in self.coefficients.elementBoundaryIntegralKeys:
14636  * if elementBoundaryQuadrature.has_key(I): # <<<<<<<<<<<<<<
14637  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14638  * else:
14639  */
14640  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_elementBoundaryQuadrature, __pyx_n_s_has_key); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 734, __pyx_L1_error)
14641  __Pyx_GOTREF(__pyx_t_15);
14642  __pyx_t_2 = NULL;
14643  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
14644  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_15);
14645  if (likely(__pyx_t_2)) {
14646  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
14647  __Pyx_INCREF(__pyx_t_2);
14648  __Pyx_INCREF(function);
14649  __Pyx_DECREF_SET(__pyx_t_15, function);
14650  }
14651  }
14652  if (!__pyx_t_2) {
14653  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 734, __pyx_L1_error)
14654  __Pyx_GOTREF(__pyx_t_6);
14655  } else {
14656  #if CYTHON_FAST_PYCALL
14657  if (PyFunction_Check(__pyx_t_15)) {
14658  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_I};
14659  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 734, __pyx_L1_error)
14660  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14661  __Pyx_GOTREF(__pyx_t_6);
14662  } else
14663  #endif
14664  #if CYTHON_FAST_PYCCALL
14665  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
14666  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_I};
14667  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 734, __pyx_L1_error)
14668  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14669  __Pyx_GOTREF(__pyx_t_6);
14670  } else
14671  #endif
14672  {
14673  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 734, __pyx_L1_error)
14674  __Pyx_GOTREF(__pyx_t_8);
14675  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
14676  __Pyx_INCREF(__pyx_v_I);
14677  __Pyx_GIVEREF(__pyx_v_I);
14678  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_I);
14679  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 734, __pyx_L1_error)
14680  __Pyx_GOTREF(__pyx_t_6);
14681  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14682  }
14683  }
14684  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14685  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 734, __pyx_L1_error)
14686  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14687  if (__pyx_t_3) {
14688 
14689  /* "ADR.pyx":735
14690  * for I in self.coefficients.elementBoundaryIntegralKeys:
14691  * if elementBoundaryQuadrature.has_key(I):
14692  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I] # <<<<<<<<<<<<<<
14693  * else:
14694  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature['default']
14695  */
14696  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementBoundaryQuadrature, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 735, __pyx_L1_error)
14697  __Pyx_GOTREF(__pyx_t_6);
14698  if (unlikely(PyDict_SetItem(__pyx_v_elementBoundaryQuadratureDict, __pyx_v_I, __pyx_t_6) < 0)) __PYX_ERR(0, 735, __pyx_L1_error)
14699  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14700 
14701  /* "ADR.pyx":734
14702  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14703  * for I in self.coefficients.elementBoundaryIntegralKeys:
14704  * if elementBoundaryQuadrature.has_key(I): # <<<<<<<<<<<<<<
14705  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14706  * else:
14707  */
14708  goto __pyx_L81;
14709  }
14710 
14711  /* "ADR.pyx":737
14712  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14713  * else:
14714  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature['default'] # <<<<<<<<<<<<<<
14715  * else:
14716  * for I in self.coefficients.elementBoundaryIntegralKeys:
14717  */
14718  /*else*/ {
14719  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementBoundaryQuadrature, __pyx_n_s_default); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 737, __pyx_L1_error)
14720  __Pyx_GOTREF(__pyx_t_6);
14721  if (unlikely(PyDict_SetItem(__pyx_v_elementBoundaryQuadratureDict, __pyx_v_I, __pyx_t_6) < 0)) __PYX_ERR(0, 737, __pyx_L1_error)
14722  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14723  }
14724  __pyx_L81:;
14725 
14726  /* "ADR.pyx":733
14727  * elementBoundaryQuadratureDict={}
14728  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14729  * for I in self.coefficients.elementBoundaryIntegralKeys: # <<<<<<<<<<<<<<
14730  * if elementBoundaryQuadrature.has_key(I):
14731  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14732  */
14733  }
14734  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14735 
14736  /* "ADR.pyx":732
14737  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14738  * elementBoundaryQuadratureDict={}
14739  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually # <<<<<<<<<<<<<<
14740  * for I in self.coefficients.elementBoundaryIntegralKeys:
14741  * if elementBoundaryQuadrature.has_key(I):
14742  */
14743  goto __pyx_L78;
14744  }
14745 
14746  /* "ADR.pyx":739
14747  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature['default']
14748  * else:
14749  * for I in self.coefficients.elementBoundaryIntegralKeys: # <<<<<<<<<<<<<<
14750  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature
14751  * #
14752  */
14753  /*else*/ {
14754  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 739, __pyx_L1_error)
14755  __Pyx_GOTREF(__pyx_t_7);
14756  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementBoundaryIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 739, __pyx_L1_error)
14757  __Pyx_GOTREF(__pyx_t_6);
14758  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14759  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
14760  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
14761  __pyx_t_5 = NULL;
14762  } else {
14763  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 739, __pyx_L1_error)
14764  __Pyx_GOTREF(__pyx_t_7);
14765  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 739, __pyx_L1_error)
14766  }
14767  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14768  for (;;) {
14769  if (likely(!__pyx_t_5)) {
14770  if (likely(PyList_CheckExact(__pyx_t_7))) {
14771  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
14772  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14773  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 739, __pyx_L1_error)
14774  #else
14775  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 739, __pyx_L1_error)
14776  __Pyx_GOTREF(__pyx_t_6);
14777  #endif
14778  } else {
14779  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
14780  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14781  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 739, __pyx_L1_error)
14782  #else
14783  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 739, __pyx_L1_error)
14784  __Pyx_GOTREF(__pyx_t_6);
14785  #endif
14786  }
14787  } else {
14788  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
14789  if (unlikely(!__pyx_t_6)) {
14790  PyObject* exc_type = PyErr_Occurred();
14791  if (exc_type) {
14792  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14793  else __PYX_ERR(0, 739, __pyx_L1_error)
14794  }
14795  break;
14796  }
14797  __Pyx_GOTREF(__pyx_t_6);
14798  }
14799  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
14800  __pyx_t_6 = 0;
14801 
14802  /* "ADR.pyx":740
14803  * else:
14804  * for I in self.coefficients.elementBoundaryIntegralKeys:
14805  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature # <<<<<<<<<<<<<<
14806  * #
14807  * # find the union of all element quadrature points and
14808  */
14809  if (unlikely(PyDict_SetItem(__pyx_v_elementBoundaryQuadratureDict, __pyx_v_I, __pyx_v_elementBoundaryQuadrature) < 0)) __PYX_ERR(0, 740, __pyx_L1_error)
14810 
14811  /* "ADR.pyx":739
14812  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature['default']
14813  * else:
14814  * for I in self.coefficients.elementBoundaryIntegralKeys: # <<<<<<<<<<<<<<
14815  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature
14816  * #
14817  */
14818  }
14819  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14820  }
14821  __pyx_L78:;
14822 
14823  /* "ADR.pyx":747
14824  * #mwf include tag telling me which indices are which quadrature rule?
14825  * (self.elementQuadraturePoints,self.elementQuadratureWeights,
14826  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict) # <<<<<<<<<<<<<<
14827  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0]
14828  * self.nQuadraturePoints_global = self.nQuadraturePoints_element*self.mesh.nElements_global
14829  */
14830  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Quadrature); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 747, __pyx_L1_error)
14831  __Pyx_GOTREF(__pyx_t_6);
14832  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_buildUnion); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 747, __pyx_L1_error)
14833  __Pyx_GOTREF(__pyx_t_15);
14834  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14835  __pyx_t_6 = NULL;
14836  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
14837  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15);
14838  if (likely(__pyx_t_6)) {
14839  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
14840  __Pyx_INCREF(__pyx_t_6);
14841  __Pyx_INCREF(function);
14842  __Pyx_DECREF_SET(__pyx_t_15, function);
14843  }
14844  }
14845  if (!__pyx_t_6) {
14846  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_elementQuadratureDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error)
14847  __Pyx_GOTREF(__pyx_t_7);
14848  } else {
14849  #if CYTHON_FAST_PYCALL
14850  if (PyFunction_Check(__pyx_t_15)) {
14851  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_elementQuadratureDict};
14852  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error)
14853  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14854  __Pyx_GOTREF(__pyx_t_7);
14855  } else
14856  #endif
14857  #if CYTHON_FAST_PYCCALL
14858  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
14859  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_elementQuadratureDict};
14860  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error)
14861  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14862  __Pyx_GOTREF(__pyx_t_7);
14863  } else
14864  #endif
14865  {
14866  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 747, __pyx_L1_error)
14867  __Pyx_GOTREF(__pyx_t_8);
14868  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
14869  __Pyx_INCREF(__pyx_v_elementQuadratureDict);
14870  __Pyx_GIVEREF(__pyx_v_elementQuadratureDict);
14871  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_elementQuadratureDict);
14872  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error)
14873  __Pyx_GOTREF(__pyx_t_7);
14874  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14875  }
14876  }
14877  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14878  if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
14879  PyObject* sequence = __pyx_t_7;
14880  #if !CYTHON_COMPILING_IN_PYPY
14881  Py_ssize_t size = Py_SIZE(sequence);
14882  #else
14883  Py_ssize_t size = PySequence_Size(sequence);
14884  #endif
14885  if (unlikely(size != 3)) {
14886  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
14887  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
14888  __PYX_ERR(0, 746, __pyx_L1_error)
14889  }
14890  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14891  if (likely(PyTuple_CheckExact(sequence))) {
14892  __pyx_t_15 = PyTuple_GET_ITEM(sequence, 0);
14893  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
14894  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2);
14895  } else {
14896  __pyx_t_15 = PyList_GET_ITEM(sequence, 0);
14897  __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
14898  __pyx_t_6 = PyList_GET_ITEM(sequence, 2);
14899  }
14900  __Pyx_INCREF(__pyx_t_15);
14901  __Pyx_INCREF(__pyx_t_8);
14902  __Pyx_INCREF(__pyx_t_6);
14903  #else
14904  __pyx_t_15 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 746, __pyx_L1_error)
14905  __Pyx_GOTREF(__pyx_t_15);
14906  __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 746, __pyx_L1_error)
14907  __Pyx_GOTREF(__pyx_t_8);
14908  __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 746, __pyx_L1_error)
14909  __Pyx_GOTREF(__pyx_t_6);
14910  #endif
14911  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14912  } else {
14913  Py_ssize_t index = -1;
14914  __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
14915  __Pyx_GOTREF(__pyx_t_2);
14916  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14917  __pyx_t_16 = Py_TYPE(__pyx_t_2)->tp_iternext;
14918  index = 0; __pyx_t_15 = __pyx_t_16(__pyx_t_2); if (unlikely(!__pyx_t_15)) goto __pyx_L84_unpacking_failed;
14919  __Pyx_GOTREF(__pyx_t_15);
14920  index = 1; __pyx_t_8 = __pyx_t_16(__pyx_t_2); if (unlikely(!__pyx_t_8)) goto __pyx_L84_unpacking_failed;
14921  __Pyx_GOTREF(__pyx_t_8);
14922  index = 2; __pyx_t_6 = __pyx_t_16(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L84_unpacking_failed;
14923  __Pyx_GOTREF(__pyx_t_6);
14924  if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_2), 3) < 0) __PYX_ERR(0, 746, __pyx_L1_error)
14925  __pyx_t_16 = NULL;
14926  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14927  goto __pyx_L85_unpacking_done;
14928  __pyx_L84_unpacking_failed:;
14929  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14930  __pyx_t_16 = NULL;
14931  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
14932  __PYX_ERR(0, 746, __pyx_L1_error)
14933  __pyx_L85_unpacking_done:;
14934  }
14935 
14936  /* "ADR.pyx":746
14937  * # weight at each point in the union
14938  * #mwf include tag telling me which indices are which quadrature rule?
14939  * (self.elementQuadraturePoints,self.elementQuadratureWeights, # <<<<<<<<<<<<<<
14940  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict)
14941  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0]
14942  */
14943  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints, __pyx_t_15) < 0) __PYX_ERR(0, 746, __pyx_L1_error)
14944  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14945  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureWeights, __pyx_t_8) < 0) __PYX_ERR(0, 746, __pyx_L1_error)
14946  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14947 
14948  /* "ADR.pyx":747
14949  * #mwf include tag telling me which indices are which quadrature rule?
14950  * (self.elementQuadraturePoints,self.elementQuadratureWeights,
14951  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict) # <<<<<<<<<<<<<<
14952  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0]
14953  * self.nQuadraturePoints_global = self.nQuadraturePoints_element*self.mesh.nElements_global
14954  */
14955  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureRuleIndeces, __pyx_t_6) < 0) __PYX_ERR(0, 747, __pyx_L1_error)
14956  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14957 
14958  /* "ADR.pyx":748
14959  * (self.elementQuadraturePoints,self.elementQuadratureWeights,
14960  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict)
14961  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0] # <<<<<<<<<<<<<<
14962  * self.nQuadraturePoints_global = self.nQuadraturePoints_element*self.mesh.nElements_global
14963  * #
14964  */
14965  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
14966  __Pyx_GOTREF(__pyx_t_7);
14967  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error)
14968  __Pyx_GOTREF(__pyx_t_6);
14969  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14970  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
14971  __Pyx_GOTREF(__pyx_t_7);
14972  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14973  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element, __pyx_t_7) < 0) __PYX_ERR(0, 748, __pyx_L1_error)
14974  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14975 
14976  /* "ADR.pyx":749
14977  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict)
14978  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0]
14979  * self.nQuadraturePoints_global = self.nQuadraturePoints_element*self.mesh.nElements_global # <<<<<<<<<<<<<<
14980  * #
14981  * #Repeat the same thing for the element boundary quadrature
14982  */
14983  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 749, __pyx_L1_error)
14984  __Pyx_GOTREF(__pyx_t_7);
14985  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 749, __pyx_L1_error)
14986  __Pyx_GOTREF(__pyx_t_6);
14987  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 749, __pyx_L1_error)
14988  __Pyx_GOTREF(__pyx_t_8);
14989  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14990  __pyx_t_6 = PyNumber_Multiply(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 749, __pyx_L1_error)
14991  __Pyx_GOTREF(__pyx_t_6);
14992  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14993  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14994  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_global, __pyx_t_6) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
14995  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14996 
14997  /* "ADR.pyx":755
14998  * (self.elementBoundaryQuadraturePoints,
14999  * self.elementBoundaryQuadratureWeights,
15000  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict) # <<<<<<<<<<<<<<
15001  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15002  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
15003  */
15004  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Quadrature); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 755, __pyx_L1_error)
15005  __Pyx_GOTREF(__pyx_t_8);
15006  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_buildUnion); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 755, __pyx_L1_error)
15007  __Pyx_GOTREF(__pyx_t_7);
15008  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15009  __pyx_t_8 = NULL;
15010  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
15011  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
15012  if (likely(__pyx_t_8)) {
15013  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
15014  __Pyx_INCREF(__pyx_t_8);
15015  __Pyx_INCREF(function);
15016  __Pyx_DECREF_SET(__pyx_t_7, function);
15017  }
15018  }
15019  if (!__pyx_t_8) {
15020  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_elementBoundaryQuadratureDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 755, __pyx_L1_error)
15021  __Pyx_GOTREF(__pyx_t_6);
15022  } else {
15023  #if CYTHON_FAST_PYCALL
15024  if (PyFunction_Check(__pyx_t_7)) {
15025  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_elementBoundaryQuadratureDict};
15026  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 755, __pyx_L1_error)
15027  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
15028  __Pyx_GOTREF(__pyx_t_6);
15029  } else
15030  #endif
15031  #if CYTHON_FAST_PYCCALL
15032  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
15033  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_elementBoundaryQuadratureDict};
15034  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 755, __pyx_L1_error)
15035  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
15036  __Pyx_GOTREF(__pyx_t_6);
15037  } else
15038  #endif
15039  {
15040  __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 755, __pyx_L1_error)
15041  __Pyx_GOTREF(__pyx_t_15);
15042  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL;
15043  __Pyx_INCREF(__pyx_v_elementBoundaryQuadratureDict);
15044  __Pyx_GIVEREF(__pyx_v_elementBoundaryQuadratureDict);
15045  PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_elementBoundaryQuadratureDict);
15046  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 755, __pyx_L1_error)
15047  __Pyx_GOTREF(__pyx_t_6);
15048  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15049  }
15050  }
15051  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15052  if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
15053  PyObject* sequence = __pyx_t_6;
15054  #if !CYTHON_COMPILING_IN_PYPY
15055  Py_ssize_t size = Py_SIZE(sequence);
15056  #else
15057  Py_ssize_t size = PySequence_Size(sequence);
15058  #endif
15059  if (unlikely(size != 3)) {
15060  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
15061  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
15062  __PYX_ERR(0, 753, __pyx_L1_error)
15063  }
15064  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15065  if (likely(PyTuple_CheckExact(sequence))) {
15066  __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
15067  __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1);
15068  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2);
15069  } else {
15070  __pyx_t_7 = PyList_GET_ITEM(sequence, 0);
15071  __pyx_t_15 = PyList_GET_ITEM(sequence, 1);
15072  __pyx_t_8 = PyList_GET_ITEM(sequence, 2);
15073  }
15074  __Pyx_INCREF(__pyx_t_7);
15075  __Pyx_INCREF(__pyx_t_15);
15076  __Pyx_INCREF(__pyx_t_8);
15077  #else
15078  __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 753, __pyx_L1_error)
15079  __Pyx_GOTREF(__pyx_t_7);
15080  __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 753, __pyx_L1_error)
15081  __Pyx_GOTREF(__pyx_t_15);
15082  __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 753, __pyx_L1_error)
15083  __Pyx_GOTREF(__pyx_t_8);
15084  #endif
15085  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15086  } else {
15087  Py_ssize_t index = -1;
15088  __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error)
15089  __Pyx_GOTREF(__pyx_t_2);
15090  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15091  __pyx_t_16 = Py_TYPE(__pyx_t_2)->tp_iternext;
15092  index = 0; __pyx_t_7 = __pyx_t_16(__pyx_t_2); if (unlikely(!__pyx_t_7)) goto __pyx_L86_unpacking_failed;
15093  __Pyx_GOTREF(__pyx_t_7);
15094  index = 1; __pyx_t_15 = __pyx_t_16(__pyx_t_2); if (unlikely(!__pyx_t_15)) goto __pyx_L86_unpacking_failed;
15095  __Pyx_GOTREF(__pyx_t_15);
15096  index = 2; __pyx_t_8 = __pyx_t_16(__pyx_t_2); if (unlikely(!__pyx_t_8)) goto __pyx_L86_unpacking_failed;
15097  __Pyx_GOTREF(__pyx_t_8);
15098  if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_2), 3) < 0) __PYX_ERR(0, 753, __pyx_L1_error)
15099  __pyx_t_16 = NULL;
15100  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15101  goto __pyx_L87_unpacking_done;
15102  __pyx_L86_unpacking_failed:;
15103  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15104  __pyx_t_16 = NULL;
15105  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
15106  __PYX_ERR(0, 753, __pyx_L1_error)
15107  __pyx_L87_unpacking_done:;
15108  }
15109 
15110  /* "ADR.pyx":753
15111  * #Repeat the same thing for the element boundary quadrature
15112  * #
15113  * (self.elementBoundaryQuadraturePoints, # <<<<<<<<<<<<<<
15114  * self.elementBoundaryQuadratureWeights,
15115  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
15116  */
15117  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints, __pyx_t_7) < 0) __PYX_ERR(0, 753, __pyx_L1_error)
15118  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15119 
15120  /* "ADR.pyx":754
15121  * #
15122  * (self.elementBoundaryQuadraturePoints,
15123  * self.elementBoundaryQuadratureWeights, # <<<<<<<<<<<<<<
15124  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
15125  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15126  */
15127  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureWeights, __pyx_t_15) < 0) __PYX_ERR(0, 754, __pyx_L1_error)
15128  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15129 
15130  /* "ADR.pyx":755
15131  * (self.elementBoundaryQuadraturePoints,
15132  * self.elementBoundaryQuadratureWeights,
15133  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict) # <<<<<<<<<<<<<<
15134  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15135  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
15136  */
15137  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureRuleInd, __pyx_t_8) < 0) __PYX_ERR(0, 755, __pyx_L1_error)
15138  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15139 
15140  /* "ADR.pyx":756
15141  * self.elementBoundaryQuadratureWeights,
15142  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
15143  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0] # <<<<<<<<<<<<<<
15144  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
15145  * self.mesh.nElementBoundaries_element*
15146  */
15147  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 756, __pyx_L1_error)
15148  __Pyx_GOTREF(__pyx_t_6);
15149  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 756, __pyx_L1_error)
15150  __Pyx_GOTREF(__pyx_t_8);
15151  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15152  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 756, __pyx_L1_error)
15153  __Pyx_GOTREF(__pyx_t_6);
15154  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15155  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_t_6) < 0) __PYX_ERR(0, 756, __pyx_L1_error)
15156  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15157 
15158  /* "ADR.pyx":757
15159  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
15160  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15161  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global* # <<<<<<<<<<<<<<
15162  * self.mesh.nElementBoundaries_element*
15163  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15164  */
15165  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 757, __pyx_L1_error)
15166  __Pyx_GOTREF(__pyx_t_6);
15167  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 757, __pyx_L1_error)
15168  __Pyx_GOTREF(__pyx_t_8);
15169  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15170 
15171  /* "ADR.pyx":758
15172  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15173  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
15174  * self.mesh.nElementBoundaries_element* # <<<<<<<<<<<<<<
15175  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15176  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15177  */
15178  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 758, __pyx_L1_error)
15179  __Pyx_GOTREF(__pyx_t_6);
15180  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nElementBoundaries_element); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 758, __pyx_L1_error)
15181  __Pyx_GOTREF(__pyx_t_15);
15182  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15183 
15184  /* "ADR.pyx":757
15185  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
15186  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15187  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global* # <<<<<<<<<<<<<<
15188  * self.mesh.nElementBoundaries_element*
15189  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15190  */
15191  __pyx_t_6 = PyNumber_Multiply(__pyx_t_8, __pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 757, __pyx_L1_error)
15192  __Pyx_GOTREF(__pyx_t_6);
15193  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15194  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15195 
15196  /* "ADR.pyx":759
15197  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
15198  * self.mesh.nElementBoundaries_element*
15199  * self.nElementBoundaryQuadraturePoints_elementBoundary) # <<<<<<<<<<<<<<
15200  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15201  * if self.nSpace_global == 3:
15202  */
15203  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 759, __pyx_L1_error)
15204  __Pyx_GOTREF(__pyx_t_15);
15205 
15206  /* "ADR.pyx":758
15207  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15208  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
15209  * self.mesh.nElementBoundaries_element* # <<<<<<<<<<<<<<
15210  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15211  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15212  */
15213  __pyx_t_8 = PyNumber_Multiply(__pyx_t_6, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 758, __pyx_L1_error)
15214  __Pyx_GOTREF(__pyx_t_8);
15215  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15216  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15217 
15218  /* "ADR.pyx":757
15219  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
15220  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15221  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global* # <<<<<<<<<<<<<<
15222  * self.mesh.nElementBoundaries_element*
15223  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15224  */
15225  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints_2, __pyx_t_8) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
15226  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15227 
15228  /* "ADR.pyx":760
15229  * self.mesh.nElementBoundaries_element*
15230  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15231  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis: # <<<<<<<<<<<<<<
15232  * if self.nSpace_global == 3:
15233  * assert(self.nQuadraturePoints_element == 5)
15234  */
15235  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 760, __pyx_L1_error)
15236  __Pyx_GOTREF(__pyx_t_8);
15237  __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 760, __pyx_L1_error)
15238  __Pyx_GOTREF(__pyx_t_15);
15239  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15240  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 760, __pyx_L1_error)
15241  __Pyx_GOTREF(__pyx_t_8);
15242  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15243  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_C0_AffineLinearOnSimplexWithNoda); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 760, __pyx_L1_error)
15244  __Pyx_GOTREF(__pyx_t_15);
15245  __pyx_t_6 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_8)), __pyx_t_15, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 760, __pyx_L1_error)
15246  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15247  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15248  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 760, __pyx_L1_error)
15249  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15250  if (__pyx_t_3) {
15251 
15252  /* "ADR.pyx":761
15253  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15254  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15255  * if self.nSpace_global == 3: # <<<<<<<<<<<<<<
15256  * assert(self.nQuadraturePoints_element == 5)
15257  * elif self.nSpace_global == 2:
15258  */
15259  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 761, __pyx_L1_error)
15260  __Pyx_GOTREF(__pyx_t_6);
15261  __pyx_t_15 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 761, __pyx_L1_error)
15262  __Pyx_GOTREF(__pyx_t_15);
15263  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15264  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 761, __pyx_L1_error)
15265  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15266  if (__pyx_t_3) {
15267 
15268  /* "ADR.pyx":762
15269  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15270  * if self.nSpace_global == 3:
15271  * assert(self.nQuadraturePoints_element == 5) # <<<<<<<<<<<<<<
15272  * elif self.nSpace_global == 2:
15273  * assert(self.nQuadraturePoints_element == 6)
15274  */
15275  #ifndef CYTHON_WITHOUT_ASSERTIONS
15276  if (unlikely(!Py_OptimizeFlag)) {
15277  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 762, __pyx_L1_error)
15278  __Pyx_GOTREF(__pyx_t_15);
15279  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_15, __pyx_int_5, 5, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 762, __pyx_L1_error)
15280  __Pyx_GOTREF(__pyx_t_6);
15281  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15282  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 762, __pyx_L1_error)
15283  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15284  if (unlikely(!__pyx_t_3)) {
15285  PyErr_SetNone(PyExc_AssertionError);
15286  __PYX_ERR(0, 762, __pyx_L1_error)
15287  }
15288  }
15289  #endif
15290 
15291  /* "ADR.pyx":761
15292  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15293  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15294  * if self.nSpace_global == 3: # <<<<<<<<<<<<<<
15295  * assert(self.nQuadraturePoints_element == 5)
15296  * elif self.nSpace_global == 2:
15297  */
15298  goto __pyx_L89;
15299  }
15300 
15301  /* "ADR.pyx":763
15302  * if self.nSpace_global == 3:
15303  * assert(self.nQuadraturePoints_element == 5)
15304  * elif self.nSpace_global == 2: # <<<<<<<<<<<<<<
15305  * assert(self.nQuadraturePoints_element == 6)
15306  * elif self.nSpace_global == 1:
15307  */
15308  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 763, __pyx_L1_error)
15309  __Pyx_GOTREF(__pyx_t_6);
15310  __pyx_t_15 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 763, __pyx_L1_error)
15311  __Pyx_GOTREF(__pyx_t_15);
15312  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15313  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 763, __pyx_L1_error)
15314  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15315  if (__pyx_t_3) {
15316 
15317  /* "ADR.pyx":764
15318  * assert(self.nQuadraturePoints_element == 5)
15319  * elif self.nSpace_global == 2:
15320  * assert(self.nQuadraturePoints_element == 6) # <<<<<<<<<<<<<<
15321  * elif self.nSpace_global == 1:
15322  * assert(self.nQuadraturePoints_element == 3)
15323  */
15324  #ifndef CYTHON_WITHOUT_ASSERTIONS
15325  if (unlikely(!Py_OptimizeFlag)) {
15326  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 764, __pyx_L1_error)
15327  __Pyx_GOTREF(__pyx_t_15);
15328  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_15, __pyx_int_6, 6, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 764, __pyx_L1_error)
15329  __Pyx_GOTREF(__pyx_t_6);
15330  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15331  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 764, __pyx_L1_error)
15332  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15333  if (unlikely(!__pyx_t_3)) {
15334  PyErr_SetNone(PyExc_AssertionError);
15335  __PYX_ERR(0, 764, __pyx_L1_error)
15336  }
15337  }
15338  #endif
15339 
15340  /* "ADR.pyx":763
15341  * if self.nSpace_global == 3:
15342  * assert(self.nQuadraturePoints_element == 5)
15343  * elif self.nSpace_global == 2: # <<<<<<<<<<<<<<
15344  * assert(self.nQuadraturePoints_element == 6)
15345  * elif self.nSpace_global == 1:
15346  */
15347  goto __pyx_L89;
15348  }
15349 
15350  /* "ADR.pyx":765
15351  * elif self.nSpace_global == 2:
15352  * assert(self.nQuadraturePoints_element == 6)
15353  * elif self.nSpace_global == 1: # <<<<<<<<<<<<<<
15354  * assert(self.nQuadraturePoints_element == 3)
15355  *
15356  */
15357  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 765, __pyx_L1_error)
15358  __Pyx_GOTREF(__pyx_t_6);
15359  __pyx_t_15 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 765, __pyx_L1_error)
15360  __Pyx_GOTREF(__pyx_t_15);
15361  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15362  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 765, __pyx_L1_error)
15363  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15364  if (__pyx_t_3) {
15365 
15366  /* "ADR.pyx":766
15367  * assert(self.nQuadraturePoints_element == 6)
15368  * elif self.nSpace_global == 1:
15369  * assert(self.nQuadraturePoints_element == 3) # <<<<<<<<<<<<<<
15370  *
15371  * if self.nSpace_global == 3:
15372  */
15373  #ifndef CYTHON_WITHOUT_ASSERTIONS
15374  if (unlikely(!Py_OptimizeFlag)) {
15375  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 766, __pyx_L1_error)
15376  __Pyx_GOTREF(__pyx_t_15);
15377  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_15, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 766, __pyx_L1_error)
15378  __Pyx_GOTREF(__pyx_t_6);
15379  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15380  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 766, __pyx_L1_error)
15381  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15382  if (unlikely(!__pyx_t_3)) {
15383  PyErr_SetNone(PyExc_AssertionError);
15384  __PYX_ERR(0, 766, __pyx_L1_error)
15385  }
15386  }
15387  #endif
15388 
15389  /* "ADR.pyx":765
15390  * elif self.nSpace_global == 2:
15391  * assert(self.nQuadraturePoints_element == 6)
15392  * elif self.nSpace_global == 1: # <<<<<<<<<<<<<<
15393  * assert(self.nQuadraturePoints_element == 3)
15394  *
15395  */
15396  }
15397  __pyx_L89:;
15398 
15399  /* "ADR.pyx":768
15400  * assert(self.nQuadraturePoints_element == 3)
15401  *
15402  * if self.nSpace_global == 3: # <<<<<<<<<<<<<<
15403  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15404  * elif self.nSpace_global == 2:
15405  */
15406  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 768, __pyx_L1_error)
15407  __Pyx_GOTREF(__pyx_t_6);
15408  __pyx_t_15 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 768, __pyx_L1_error)
15409  __Pyx_GOTREF(__pyx_t_15);
15410  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15411  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 768, __pyx_L1_error)
15412  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15413  if (__pyx_t_3) {
15414 
15415  /* "ADR.pyx":769
15416  *
15417  * if self.nSpace_global == 3:
15418  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4) # <<<<<<<<<<<<<<
15419  * elif self.nSpace_global == 2:
15420  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15421  */
15422  #ifndef CYTHON_WITHOUT_ASSERTIONS
15423  if (unlikely(!Py_OptimizeFlag)) {
15424  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 769, __pyx_L1_error)
15425  __Pyx_GOTREF(__pyx_t_15);
15426  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_15, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 769, __pyx_L1_error)
15427  __Pyx_GOTREF(__pyx_t_6);
15428  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15429  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 769, __pyx_L1_error)
15430  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15431  if (unlikely(!__pyx_t_3)) {
15432  PyErr_SetNone(PyExc_AssertionError);
15433  __PYX_ERR(0, 769, __pyx_L1_error)
15434  }
15435  }
15436  #endif
15437 
15438  /* "ADR.pyx":768
15439  * assert(self.nQuadraturePoints_element == 3)
15440  *
15441  * if self.nSpace_global == 3: # <<<<<<<<<<<<<<
15442  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15443  * elif self.nSpace_global == 2:
15444  */
15445  goto __pyx_L90;
15446  }
15447 
15448  /* "ADR.pyx":770
15449  * if self.nSpace_global == 3:
15450  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15451  * elif self.nSpace_global == 2: # <<<<<<<<<<<<<<
15452  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15453  * elif self.nSpace_global == 1:
15454  */
15455  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
15456  __Pyx_GOTREF(__pyx_t_6);
15457  __pyx_t_15 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 770, __pyx_L1_error)
15458  __Pyx_GOTREF(__pyx_t_15);
15459  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15460  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 770, __pyx_L1_error)
15461  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15462  if (__pyx_t_3) {
15463 
15464  /* "ADR.pyx":771
15465  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15466  * elif self.nSpace_global == 2:
15467  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4) # <<<<<<<<<<<<<<
15468  * elif self.nSpace_global == 1:
15469  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 1)
15470  */
15471  #ifndef CYTHON_WITHOUT_ASSERTIONS
15472  if (unlikely(!Py_OptimizeFlag)) {
15473  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 771, __pyx_L1_error)
15474  __Pyx_GOTREF(__pyx_t_15);
15475  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_15, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 771, __pyx_L1_error)
15476  __Pyx_GOTREF(__pyx_t_6);
15477  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15478  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 771, __pyx_L1_error)
15479  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15480  if (unlikely(!__pyx_t_3)) {
15481  PyErr_SetNone(PyExc_AssertionError);
15482  __PYX_ERR(0, 771, __pyx_L1_error)
15483  }
15484  }
15485  #endif
15486 
15487  /* "ADR.pyx":770
15488  * if self.nSpace_global == 3:
15489  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15490  * elif self.nSpace_global == 2: # <<<<<<<<<<<<<<
15491  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15492  * elif self.nSpace_global == 1:
15493  */
15494  goto __pyx_L90;
15495  }
15496 
15497  /* "ADR.pyx":772
15498  * elif self.nSpace_global == 2:
15499  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15500  * elif self.nSpace_global == 1: # <<<<<<<<<<<<<<
15501  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 1)
15502  *
15503  */
15504  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)
15505  __Pyx_GOTREF(__pyx_t_6);
15506  __pyx_t_15 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 772, __pyx_L1_error)
15507  __Pyx_GOTREF(__pyx_t_15);
15508  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15509  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 772, __pyx_L1_error)
15510  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15511  if (__pyx_t_3) {
15512 
15513  /* "ADR.pyx":773
15514  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15515  * elif self.nSpace_global == 1:
15516  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 1) # <<<<<<<<<<<<<<
15517  *
15518  * #pdb.set_trace()
15519  */
15520  #ifndef CYTHON_WITHOUT_ASSERTIONS
15521  if (unlikely(!Py_OptimizeFlag)) {
15522  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 773, __pyx_L1_error)
15523  __Pyx_GOTREF(__pyx_t_15);
15524  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_15, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error)
15525  __Pyx_GOTREF(__pyx_t_6);
15526  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15527  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 773, __pyx_L1_error)
15528  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15529  if (unlikely(!__pyx_t_3)) {
15530  PyErr_SetNone(PyExc_AssertionError);
15531  __PYX_ERR(0, 773, __pyx_L1_error)
15532  }
15533  }
15534  #endif
15535 
15536  /* "ADR.pyx":772
15537  * elif self.nSpace_global == 2:
15538  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15539  * elif self.nSpace_global == 1: # <<<<<<<<<<<<<<
15540  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 1)
15541  *
15542  */
15543  }
15544  __pyx_L90:;
15545 
15546  /* "ADR.pyx":760
15547  * self.mesh.nElementBoundaries_element*
15548  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15549  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis: # <<<<<<<<<<<<<<
15550  * if self.nSpace_global == 3:
15551  * assert(self.nQuadraturePoints_element == 5)
15552  */
15553  }
15554 
15555  /* "ADR.pyx":779
15556  * #simplified allocations for test==trial and also check if space is mixed or not
15557  * #
15558  * self.q={} # <<<<<<<<<<<<<<
15559  * self.ebq={}
15560  * self.ebq_global={}
15561  */
15562  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 779, __pyx_L1_error)
15563  __Pyx_GOTREF(__pyx_t_6);
15564  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_q, __pyx_t_6) < 0) __PYX_ERR(0, 779, __pyx_L1_error)
15565  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15566 
15567  /* "ADR.pyx":780
15568  * #
15569  * self.q={}
15570  * self.ebq={} # <<<<<<<<<<<<<<
15571  * self.ebq_global={}
15572  * self.ebqe={}
15573  */
15574  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 780, __pyx_L1_error)
15575  __Pyx_GOTREF(__pyx_t_6);
15576  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ebq, __pyx_t_6) < 0) __PYX_ERR(0, 780, __pyx_L1_error)
15577  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15578 
15579  /* "ADR.pyx":781
15580  * self.q={}
15581  * self.ebq={}
15582  * self.ebq_global={} # <<<<<<<<<<<<<<
15583  * self.ebqe={}
15584  * self.phi_ip={}
15585  */
15586  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 781, __pyx_L1_error)
15587  __Pyx_GOTREF(__pyx_t_6);
15588  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ebq_global, __pyx_t_6) < 0) __PYX_ERR(0, 781, __pyx_L1_error)
15589  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15590 
15591  /* "ADR.pyx":782
15592  * self.ebq={}
15593  * self.ebq_global={}
15594  * self.ebqe={} # <<<<<<<<<<<<<<
15595  * self.phi_ip={}
15596  * #mesh
15597  */
15598  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 782, __pyx_L1_error)
15599  __Pyx_GOTREF(__pyx_t_6);
15600  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ebqe, __pyx_t_6) < 0) __PYX_ERR(0, 782, __pyx_L1_error)
15601  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15602 
15603  /* "ADR.pyx":783
15604  * self.ebq_global={}
15605  * self.ebqe={}
15606  * self.phi_ip={} # <<<<<<<<<<<<<<
15607  * #mesh
15608  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d')
15609  */
15610  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 783, __pyx_L1_error)
15611  __Pyx_GOTREF(__pyx_t_6);
15612  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_phi_ip, __pyx_t_6) < 0) __PYX_ERR(0, 783, __pyx_L1_error)
15613  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15614 
15615  /* "ADR.pyx":785
15616  * self.phi_ip={}
15617  * #mesh
15618  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d') # <<<<<<<<<<<<<<
15619  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
15620  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15621  */
15622  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 785, __pyx_L1_error)
15623  __Pyx_GOTREF(__pyx_t_15);
15624  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 785, __pyx_L1_error)
15625  __Pyx_GOTREF(__pyx_t_8);
15626  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15627  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 785, __pyx_L1_error)
15628  __Pyx_GOTREF(__pyx_t_15);
15629  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 785, __pyx_L1_error)
15630  __Pyx_GOTREF(__pyx_t_7);
15631  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15632  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 785, __pyx_L1_error)
15633  __Pyx_GOTREF(__pyx_t_15);
15634  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error)
15635  __Pyx_GOTREF(__pyx_t_2);
15636  __Pyx_GIVEREF(__pyx_t_7);
15637  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
15638  __Pyx_GIVEREF(__pyx_t_15);
15639  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_15);
15640  __Pyx_INCREF(__pyx_int_3);
15641  __Pyx_GIVEREF(__pyx_int_3);
15642  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_3);
15643  __pyx_t_7 = 0;
15644  __pyx_t_15 = 0;
15645  __pyx_t_15 = NULL;
15646  __pyx_t_14 = 0;
15647  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
15648  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
15649  if (likely(__pyx_t_15)) {
15650  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
15651  __Pyx_INCREF(__pyx_t_15);
15652  __Pyx_INCREF(function);
15653  __Pyx_DECREF_SET(__pyx_t_8, function);
15654  __pyx_t_14 = 1;
15655  }
15656  }
15657  #if CYTHON_FAST_PYCALL
15658  if (PyFunction_Check(__pyx_t_8)) {
15659  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_2, __pyx_n_s_d};
15660  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 785, __pyx_L1_error)
15661  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
15662  __Pyx_GOTREF(__pyx_t_6);
15663  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15664  } else
15665  #endif
15666  #if CYTHON_FAST_PYCCALL
15667  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
15668  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_2, __pyx_n_s_d};
15669  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 785, __pyx_L1_error)
15670  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
15671  __Pyx_GOTREF(__pyx_t_6);
15672  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15673  } else
15674  #endif
15675  {
15676  __pyx_t_7 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 785, __pyx_L1_error)
15677  __Pyx_GOTREF(__pyx_t_7);
15678  if (__pyx_t_15) {
15679  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_15); __pyx_t_15 = NULL;
15680  }
15681  __Pyx_GIVEREF(__pyx_t_2);
15682  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_14, __pyx_t_2);
15683  __Pyx_INCREF(__pyx_n_s_d);
15684  __Pyx_GIVEREF(__pyx_n_s_d);
15685  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_14, __pyx_n_s_d);
15686  __pyx_t_2 = 0;
15687  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 785, __pyx_L1_error)
15688  __Pyx_GOTREF(__pyx_t_6);
15689  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15690  }
15691  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15692  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 785, __pyx_L1_error)
15693  __Pyx_GOTREF(__pyx_t_8);
15694  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_n_s_x, __pyx_t_6) < 0)) __PYX_ERR(0, 785, __pyx_L1_error)
15695  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15696  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15697 
15698  /* "ADR.pyx":786
15699  * #mesh
15700  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d')
15701  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d') # <<<<<<<<<<<<<<
15702  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15703  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15704  */
15705  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 786, __pyx_L1_error)
15706  __Pyx_GOTREF(__pyx_t_8);
15707  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 786, __pyx_L1_error)
15708  __Pyx_GOTREF(__pyx_t_7);
15709  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15710  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 786, __pyx_L1_error)
15711  __Pyx_GOTREF(__pyx_t_8);
15712  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
15713  __Pyx_GOTREF(__pyx_t_2);
15714  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15715  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 786, __pyx_L1_error)
15716  __Pyx_GOTREF(__pyx_t_8);
15717  __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 786, __pyx_L1_error)
15718  __Pyx_GOTREF(__pyx_t_15);
15719  __Pyx_GIVEREF(__pyx_t_2);
15720  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_2);
15721  __Pyx_GIVEREF(__pyx_t_8);
15722  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_8);
15723  __Pyx_INCREF(__pyx_int_3);
15724  __Pyx_GIVEREF(__pyx_int_3);
15725  PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_int_3);
15726  __pyx_t_2 = 0;
15727  __pyx_t_8 = 0;
15728  __pyx_t_8 = NULL;
15729  __pyx_t_14 = 0;
15730  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
15731  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
15732  if (likely(__pyx_t_8)) {
15733  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
15734  __Pyx_INCREF(__pyx_t_8);
15735  __Pyx_INCREF(function);
15736  __Pyx_DECREF_SET(__pyx_t_7, function);
15737  __pyx_t_14 = 1;
15738  }
15739  }
15740  #if CYTHON_FAST_PYCALL
15741  if (PyFunction_Check(__pyx_t_7)) {
15742  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_15, __pyx_n_s_d};
15743  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 786, __pyx_L1_error)
15744  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
15745  __Pyx_GOTREF(__pyx_t_6);
15746  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15747  } else
15748  #endif
15749  #if CYTHON_FAST_PYCCALL
15750  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
15751  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_15, __pyx_n_s_d};
15752  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 786, __pyx_L1_error)
15753  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
15754  __Pyx_GOTREF(__pyx_t_6);
15755  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15756  } else
15757  #endif
15758  {
15759  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
15760  __Pyx_GOTREF(__pyx_t_2);
15761  if (__pyx_t_8) {
15762  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
15763  }
15764  __Pyx_GIVEREF(__pyx_t_15);
15765  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_t_15);
15766  __Pyx_INCREF(__pyx_n_s_d);
15767  __Pyx_GIVEREF(__pyx_n_s_d);
15768  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_n_s_d);
15769  __pyx_t_15 = 0;
15770  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 786, __pyx_L1_error)
15771  __Pyx_GOTREF(__pyx_t_6);
15772  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15773  }
15774  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15775  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 786, __pyx_L1_error)
15776  __Pyx_GOTREF(__pyx_t_7);
15777  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_n_s_x, __pyx_t_6) < 0)) __PYX_ERR(0, 786, __pyx_L1_error)
15778  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15779  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15780 
15781  /* "ADR.pyx":787
15782  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d')
15783  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
15784  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
15785  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15786  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
15787  */
15788  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error)
15789  __Pyx_GOTREF(__pyx_t_7);
15790  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
15791  __Pyx_GOTREF(__pyx_t_2);
15792  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15793  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error)
15794  __Pyx_GOTREF(__pyx_t_7);
15795  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 787, __pyx_L1_error)
15796  __Pyx_GOTREF(__pyx_t_15);
15797  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15798  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error)
15799  __Pyx_GOTREF(__pyx_t_7);
15800  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 787, __pyx_L1_error)
15801  __Pyx_GOTREF(__pyx_t_8);
15802  __Pyx_GIVEREF(__pyx_t_15);
15803  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_15);
15804  __Pyx_GIVEREF(__pyx_t_7);
15805  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
15806  __pyx_t_15 = 0;
15807  __pyx_t_7 = 0;
15808  __pyx_t_7 = NULL;
15809  __pyx_t_14 = 0;
15810  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
15811  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
15812  if (likely(__pyx_t_7)) {
15813  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
15814  __Pyx_INCREF(__pyx_t_7);
15815  __Pyx_INCREF(function);
15816  __Pyx_DECREF_SET(__pyx_t_2, function);
15817  __pyx_t_14 = 1;
15818  }
15819  }
15820  #if CYTHON_FAST_PYCALL
15821  if (PyFunction_Check(__pyx_t_2)) {
15822  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, __pyx_n_s_d};
15823  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 787, __pyx_L1_error)
15824  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15825  __Pyx_GOTREF(__pyx_t_6);
15826  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15827  } else
15828  #endif
15829  #if CYTHON_FAST_PYCCALL
15830  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
15831  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, __pyx_n_s_d};
15832  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 787, __pyx_L1_error)
15833  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15834  __Pyx_GOTREF(__pyx_t_6);
15835  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15836  } else
15837  #endif
15838  {
15839  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 787, __pyx_L1_error)
15840  __Pyx_GOTREF(__pyx_t_15);
15841  if (__pyx_t_7) {
15842  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7); __pyx_t_7 = NULL;
15843  }
15844  __Pyx_GIVEREF(__pyx_t_8);
15845  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_8);
15846  __Pyx_INCREF(__pyx_n_s_d);
15847  __Pyx_GIVEREF(__pyx_n_s_d);
15848  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_n_s_d);
15849  __pyx_t_8 = 0;
15850  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 787, __pyx_L1_error)
15851  __Pyx_GOTREF(__pyx_t_6);
15852  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15853  }
15854  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15855  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
15856  __Pyx_GOTREF(__pyx_t_2);
15857  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_tuple__27, __pyx_t_6) < 0)) __PYX_ERR(0, 787, __pyx_L1_error)
15858  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15859  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15860 
15861  /* "ADR.pyx":788
15862  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
15863  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15864  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d') # <<<<<<<<<<<<<<
15865  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
15866  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15867  */
15868  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error)
15869  __Pyx_GOTREF(__pyx_t_2);
15870  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 788, __pyx_L1_error)
15871  __Pyx_GOTREF(__pyx_t_15);
15872  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15873  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error)
15874  __Pyx_GOTREF(__pyx_t_2);
15875  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 788, __pyx_L1_error)
15876  __Pyx_GOTREF(__pyx_t_8);
15877  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15878  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error)
15879  __Pyx_GOTREF(__pyx_t_2);
15880  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 788, __pyx_L1_error)
15881  __Pyx_GOTREF(__pyx_t_7);
15882  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error)
15883  __Pyx_GOTREF(__pyx_t_1);
15884  __Pyx_GIVEREF(__pyx_t_8);
15885  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
15886  __Pyx_GIVEREF(__pyx_t_2);
15887  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
15888  __Pyx_GIVEREF(__pyx_t_7);
15889  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
15890  __pyx_t_8 = 0;
15891  __pyx_t_2 = 0;
15892  __pyx_t_7 = 0;
15893  __pyx_t_7 = NULL;
15894  __pyx_t_14 = 0;
15895  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
15896  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_15);
15897  if (likely(__pyx_t_7)) {
15898  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
15899  __Pyx_INCREF(__pyx_t_7);
15900  __Pyx_INCREF(function);
15901  __Pyx_DECREF_SET(__pyx_t_15, function);
15902  __pyx_t_14 = 1;
15903  }
15904  }
15905  #if CYTHON_FAST_PYCALL
15906  if (PyFunction_Check(__pyx_t_15)) {
15907  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
15908  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 788, __pyx_L1_error)
15909  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15910  __Pyx_GOTREF(__pyx_t_6);
15911  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15912  } else
15913  #endif
15914  #if CYTHON_FAST_PYCCALL
15915  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
15916  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
15917  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 788, __pyx_L1_error)
15918  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15919  __Pyx_GOTREF(__pyx_t_6);
15920  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15921  } else
15922  #endif
15923  {
15924  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error)
15925  __Pyx_GOTREF(__pyx_t_2);
15926  if (__pyx_t_7) {
15927  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
15928  }
15929  __Pyx_GIVEREF(__pyx_t_1);
15930  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_t_1);
15931  __Pyx_INCREF(__pyx_n_s_d);
15932  __Pyx_GIVEREF(__pyx_n_s_d);
15933  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_n_s_d);
15934  __pyx_t_1 = 0;
15935  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 788, __pyx_L1_error)
15936  __Pyx_GOTREF(__pyx_t_6);
15937  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15938  }
15939  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15940  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 788, __pyx_L1_error)
15941  __Pyx_GOTREF(__pyx_t_15);
15942  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_tuple__28, __pyx_t_6) < 0)) __PYX_ERR(0, 788, __pyx_L1_error)
15943  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15944  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15945 
15946  /* "ADR.pyx":789
15947  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15948  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15949  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d') # <<<<<<<<<<<<<<
15950  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15951  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15952  */
15953  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 789, __pyx_L1_error)
15954  __Pyx_GOTREF(__pyx_t_15);
15955  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error)
15956  __Pyx_GOTREF(__pyx_t_2);
15957  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15958  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 789, __pyx_L1_error)
15959  __Pyx_GOTREF(__pyx_t_15);
15960  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error)
15961  __Pyx_GOTREF(__pyx_t_1);
15962  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15963  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 789, __pyx_L1_error)
15964  __Pyx_GOTREF(__pyx_t_15);
15965  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 789, __pyx_L1_error)
15966  __Pyx_GOTREF(__pyx_t_7);
15967  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 789, __pyx_L1_error)
15968  __Pyx_GOTREF(__pyx_t_8);
15969  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15970  __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_tuple__29); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 789, __pyx_L1_error)
15971  __Pyx_GOTREF(__pyx_t_7);
15972  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15973  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 789, __pyx_L1_error)
15974  __Pyx_GOTREF(__pyx_t_8);
15975  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15976  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 789, __pyx_L1_error)
15977  __Pyx_GOTREF(__pyx_t_7);
15978  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15979  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 789, __pyx_L1_error)
15980  __Pyx_GOTREF(__pyx_t_8);
15981  __Pyx_GIVEREF(__pyx_t_1);
15982  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
15983  __Pyx_GIVEREF(__pyx_t_15);
15984  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_15);
15985  __Pyx_GIVEREF(__pyx_t_7);
15986  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
15987  __pyx_t_1 = 0;
15988  __pyx_t_15 = 0;
15989  __pyx_t_7 = 0;
15990  __pyx_t_7 = NULL;
15991  __pyx_t_14 = 0;
15992  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
15993  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
15994  if (likely(__pyx_t_7)) {
15995  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
15996  __Pyx_INCREF(__pyx_t_7);
15997  __Pyx_INCREF(function);
15998  __Pyx_DECREF_SET(__pyx_t_2, function);
15999  __pyx_t_14 = 1;
16000  }
16001  }
16002  #if CYTHON_FAST_PYCALL
16003  if (PyFunction_Check(__pyx_t_2)) {
16004  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, __pyx_n_s_d};
16005  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 789, __pyx_L1_error)
16006  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16007  __Pyx_GOTREF(__pyx_t_6);
16008  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16009  } else
16010  #endif
16011  #if CYTHON_FAST_PYCCALL
16012  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
16013  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, __pyx_n_s_d};
16014  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 789, __pyx_L1_error)
16015  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16016  __Pyx_GOTREF(__pyx_t_6);
16017  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16018  } else
16019  #endif
16020  {
16021  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 789, __pyx_L1_error)
16022  __Pyx_GOTREF(__pyx_t_15);
16023  if (__pyx_t_7) {
16024  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7); __pyx_t_7 = NULL;
16025  }
16026  __Pyx_GIVEREF(__pyx_t_8);
16027  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_8);
16028  __Pyx_INCREF(__pyx_n_s_d);
16029  __Pyx_GIVEREF(__pyx_n_s_d);
16030  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_n_s_d);
16031  __pyx_t_8 = 0;
16032  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 789, __pyx_L1_error)
16033  __Pyx_GOTREF(__pyx_t_6);
16034  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16035  }
16036  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16037  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error)
16038  __Pyx_GOTREF(__pyx_t_2);
16039  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_tuple__30, __pyx_t_6) < 0)) __PYX_ERR(0, 789, __pyx_L1_error)
16040  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16041  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16042 
16043  /* "ADR.pyx":790
16044  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
16045  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
16046  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d') # <<<<<<<<<<<<<<
16047  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16048  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16049  */
16050  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error)
16051  __Pyx_GOTREF(__pyx_t_2);
16052  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 790, __pyx_L1_error)
16053  __Pyx_GOTREF(__pyx_t_15);
16054  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16055  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error)
16056  __Pyx_GOTREF(__pyx_t_2);
16057  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 790, __pyx_L1_error)
16058  __Pyx_GOTREF(__pyx_t_8);
16059  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16060  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error)
16061  __Pyx_GOTREF(__pyx_t_2);
16062  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 790, __pyx_L1_error)
16063  __Pyx_GOTREF(__pyx_t_7);
16064  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
16065  __Pyx_GOTREF(__pyx_t_1);
16066  __Pyx_GIVEREF(__pyx_t_8);
16067  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
16068  __Pyx_GIVEREF(__pyx_t_2);
16069  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
16070  __Pyx_GIVEREF(__pyx_t_7);
16071  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
16072  __pyx_t_8 = 0;
16073  __pyx_t_2 = 0;
16074  __pyx_t_7 = 0;
16075  __pyx_t_7 = NULL;
16076  __pyx_t_14 = 0;
16077  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
16078  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_15);
16079  if (likely(__pyx_t_7)) {
16080  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
16081  __Pyx_INCREF(__pyx_t_7);
16082  __Pyx_INCREF(function);
16083  __Pyx_DECREF_SET(__pyx_t_15, function);
16084  __pyx_t_14 = 1;
16085  }
16086  }
16087  #if CYTHON_FAST_PYCALL
16088  if (PyFunction_Check(__pyx_t_15)) {
16089  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
16090  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 790, __pyx_L1_error)
16091  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16092  __Pyx_GOTREF(__pyx_t_6);
16093  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16094  } else
16095  #endif
16096  #if CYTHON_FAST_PYCCALL
16097  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
16098  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
16099  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 790, __pyx_L1_error)
16100  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16101  __Pyx_GOTREF(__pyx_t_6);
16102  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16103  } else
16104  #endif
16105  {
16106  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error)
16107  __Pyx_GOTREF(__pyx_t_2);
16108  if (__pyx_t_7) {
16109  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
16110  }
16111  __Pyx_GIVEREF(__pyx_t_1);
16112  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_t_1);
16113  __Pyx_INCREF(__pyx_n_s_d);
16114  __Pyx_GIVEREF(__pyx_n_s_d);
16115  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_n_s_d);
16116  __pyx_t_1 = 0;
16117  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 790, __pyx_L1_error)
16118  __Pyx_GOTREF(__pyx_t_6);
16119  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16120  }
16121  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16122  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 790, __pyx_L1_error)
16123  __Pyx_GOTREF(__pyx_t_15);
16124  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_tuple__31, __pyx_t_6) < 0)) __PYX_ERR(0, 790, __pyx_L1_error)
16125  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16126  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16127 
16128  /* "ADR.pyx":791
16129  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
16130  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
16131  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
16132  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16133  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16134  */
16135  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 791, __pyx_L1_error)
16136  __Pyx_GOTREF(__pyx_t_15);
16137  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
16138  __Pyx_GOTREF(__pyx_t_2);
16139  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16140  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 791, __pyx_L1_error)
16141  __Pyx_GOTREF(__pyx_t_15);
16142  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
16143  __Pyx_GOTREF(__pyx_t_1);
16144  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16145  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 791, __pyx_L1_error)
16146  __Pyx_GOTREF(__pyx_t_15);
16147  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 791, __pyx_L1_error)
16148  __Pyx_GOTREF(__pyx_t_7);
16149  __Pyx_GIVEREF(__pyx_t_1);
16150  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
16151  __Pyx_GIVEREF(__pyx_t_15);
16152  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_15);
16153  __pyx_t_1 = 0;
16154  __pyx_t_15 = 0;
16155  __pyx_t_15 = NULL;
16156  __pyx_t_14 = 0;
16157  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
16158  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
16159  if (likely(__pyx_t_15)) {
16160  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
16161  __Pyx_INCREF(__pyx_t_15);
16162  __Pyx_INCREF(function);
16163  __Pyx_DECREF_SET(__pyx_t_2, function);
16164  __pyx_t_14 = 1;
16165  }
16166  }
16167  #if CYTHON_FAST_PYCALL
16168  if (PyFunction_Check(__pyx_t_2)) {
16169  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_7, __pyx_n_s_d};
16170  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
16171  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
16172  __Pyx_GOTREF(__pyx_t_6);
16173  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16174  } else
16175  #endif
16176  #if CYTHON_FAST_PYCCALL
16177  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
16178  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_7, __pyx_n_s_d};
16179  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
16180  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
16181  __Pyx_GOTREF(__pyx_t_6);
16182  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16183  } else
16184  #endif
16185  {
16186  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
16187  __Pyx_GOTREF(__pyx_t_1);
16188  if (__pyx_t_15) {
16189  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15); __pyx_t_15 = NULL;
16190  }
16191  __Pyx_GIVEREF(__pyx_t_7);
16192  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_7);
16193  __Pyx_INCREF(__pyx_n_s_d);
16194  __Pyx_GIVEREF(__pyx_n_s_d);
16195  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_n_s_d);
16196  __pyx_t_7 = 0;
16197  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
16198  __Pyx_GOTREF(__pyx_t_6);
16199  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16200  }
16201  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16202  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
16203  __Pyx_GOTREF(__pyx_t_2);
16204  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_tuple__32, __pyx_t_6) < 0)) __PYX_ERR(0, 791, __pyx_L1_error)
16205  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16206  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16207 
16208  /* "ADR.pyx":792
16209  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
16210  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16211  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
16212  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16213  *
16214  */
16215  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
16216  __Pyx_GOTREF(__pyx_t_2);
16217  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
16218  __Pyx_GOTREF(__pyx_t_1);
16219  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16220  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
16221  __Pyx_GOTREF(__pyx_t_2);
16222  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 792, __pyx_L1_error)
16223  __Pyx_GOTREF(__pyx_t_7);
16224  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16225  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
16226  __Pyx_GOTREF(__pyx_t_2);
16227  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 792, __pyx_L1_error)
16228  __Pyx_GOTREF(__pyx_t_15);
16229  __Pyx_GIVEREF(__pyx_t_7);
16230  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
16231  __Pyx_GIVEREF(__pyx_t_2);
16232  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_2);
16233  __pyx_t_7 = 0;
16234  __pyx_t_2 = 0;
16235  __pyx_t_2 = NULL;
16236  __pyx_t_14 = 0;
16237  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
16238  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
16239  if (likely(__pyx_t_2)) {
16240  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
16241  __Pyx_INCREF(__pyx_t_2);
16242  __Pyx_INCREF(function);
16243  __Pyx_DECREF_SET(__pyx_t_1, function);
16244  __pyx_t_14 = 1;
16245  }
16246  }
16247  #if CYTHON_FAST_PYCALL
16248  if (PyFunction_Check(__pyx_t_1)) {
16249  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_n_s_d};
16250  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 792, __pyx_L1_error)
16251  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16252  __Pyx_GOTREF(__pyx_t_6);
16253  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16254  } else
16255  #endif
16256  #if CYTHON_FAST_PYCCALL
16257  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
16258  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_n_s_d};
16259  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 792, __pyx_L1_error)
16260  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16261  __Pyx_GOTREF(__pyx_t_6);
16262  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16263  } else
16264  #endif
16265  {
16266  __pyx_t_7 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 792, __pyx_L1_error)
16267  __Pyx_GOTREF(__pyx_t_7);
16268  if (__pyx_t_2) {
16269  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
16270  }
16271  __Pyx_GIVEREF(__pyx_t_15);
16272  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_14, __pyx_t_15);
16273  __Pyx_INCREF(__pyx_n_s_d);
16274  __Pyx_GIVEREF(__pyx_n_s_d);
16275  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_14, __pyx_n_s_d);
16276  __pyx_t_15 = 0;
16277  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 792, __pyx_L1_error)
16278  __Pyx_GOTREF(__pyx_t_6);
16279  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16280  }
16281  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16282  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
16283  __Pyx_GOTREF(__pyx_t_1);
16284  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_tuple__33, __pyx_t_6) < 0)) __PYX_ERR(0, 792, __pyx_L1_error)
16285  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16286  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16287 
16288  /* "ADR.pyx":793
16289  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16290  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16291  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
16292  *
16293  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16294  */
16295  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
16296  __Pyx_GOTREF(__pyx_t_1);
16297  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 793, __pyx_L1_error)
16298  __Pyx_GOTREF(__pyx_t_7);
16299  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16300  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
16301  __Pyx_GOTREF(__pyx_t_1);
16302  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 793, __pyx_L1_error)
16303  __Pyx_GOTREF(__pyx_t_15);
16304  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16305  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
16306  __Pyx_GOTREF(__pyx_t_1);
16307  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error)
16308  __Pyx_GOTREF(__pyx_t_2);
16309  __Pyx_GIVEREF(__pyx_t_15);
16310  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15);
16311  __Pyx_GIVEREF(__pyx_t_1);
16312  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
16313  __pyx_t_15 = 0;
16314  __pyx_t_1 = 0;
16315  __pyx_t_1 = NULL;
16316  __pyx_t_14 = 0;
16317  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
16318  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
16319  if (likely(__pyx_t_1)) {
16320  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
16321  __Pyx_INCREF(__pyx_t_1);
16322  __Pyx_INCREF(function);
16323  __Pyx_DECREF_SET(__pyx_t_7, function);
16324  __pyx_t_14 = 1;
16325  }
16326  }
16327  #if CYTHON_FAST_PYCALL
16328  if (PyFunction_Check(__pyx_t_7)) {
16329  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_n_s_d};
16330  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
16331  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16332  __Pyx_GOTREF(__pyx_t_6);
16333  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16334  } else
16335  #endif
16336  #if CYTHON_FAST_PYCCALL
16337  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
16338  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_n_s_d};
16339  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
16340  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16341  __Pyx_GOTREF(__pyx_t_6);
16342  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16343  } else
16344  #endif
16345  {
16346  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 793, __pyx_L1_error)
16347  __Pyx_GOTREF(__pyx_t_15);
16348  if (__pyx_t_1) {
16349  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __pyx_t_1 = NULL;
16350  }
16351  __Pyx_GIVEREF(__pyx_t_2);
16352  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_2);
16353  __Pyx_INCREF(__pyx_n_s_d);
16354  __Pyx_GIVEREF(__pyx_n_s_d);
16355  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_n_s_d);
16356  __pyx_t_2 = 0;
16357  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
16358  __Pyx_GOTREF(__pyx_t_6);
16359  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16360  }
16361  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16362  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 793, __pyx_L1_error)
16363  __Pyx_GOTREF(__pyx_t_7);
16364  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_tuple__34, __pyx_t_6) < 0)) __PYX_ERR(0, 793, __pyx_L1_error)
16365  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16366  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16367 
16368  /* "ADR.pyx":795
16369  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16370  *
16371  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16372  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16373  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16374  */
16375  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 795, __pyx_L1_error)
16376  __Pyx_GOTREF(__pyx_t_7);
16377  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 795, __pyx_L1_error)
16378  __Pyx_GOTREF(__pyx_t_15);
16379  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16380  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 795, __pyx_L1_error)
16381  __Pyx_GOTREF(__pyx_t_7);
16382  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error)
16383  __Pyx_GOTREF(__pyx_t_2);
16384  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16385  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 795, __pyx_L1_error)
16386  __Pyx_GOTREF(__pyx_t_7);
16387  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
16388  __Pyx_GOTREF(__pyx_t_1);
16389  __Pyx_GIVEREF(__pyx_t_2);
16390  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
16391  __Pyx_GIVEREF(__pyx_t_7);
16392  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
16393  __pyx_t_2 = 0;
16394  __pyx_t_7 = 0;
16395  __pyx_t_7 = NULL;
16396  __pyx_t_14 = 0;
16397  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
16398  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_15);
16399  if (likely(__pyx_t_7)) {
16400  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
16401  __Pyx_INCREF(__pyx_t_7);
16402  __Pyx_INCREF(function);
16403  __Pyx_DECREF_SET(__pyx_t_15, function);
16404  __pyx_t_14 = 1;
16405  }
16406  }
16407  #if CYTHON_FAST_PYCALL
16408  if (PyFunction_Check(__pyx_t_15)) {
16409  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
16410  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 795, __pyx_L1_error)
16411  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16412  __Pyx_GOTREF(__pyx_t_6);
16413  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16414  } else
16415  #endif
16416  #if CYTHON_FAST_PYCCALL
16417  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
16418  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
16419  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 795, __pyx_L1_error)
16420  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16421  __Pyx_GOTREF(__pyx_t_6);
16422  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16423  } else
16424  #endif
16425  {
16426  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error)
16427  __Pyx_GOTREF(__pyx_t_2);
16428  if (__pyx_t_7) {
16429  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
16430  }
16431  __Pyx_GIVEREF(__pyx_t_1);
16432  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_t_1);
16433  __Pyx_INCREF(__pyx_n_s_d);
16434  __Pyx_GIVEREF(__pyx_n_s_d);
16435  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_n_s_d);
16436  __pyx_t_1 = 0;
16437  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 795, __pyx_L1_error)
16438  __Pyx_GOTREF(__pyx_t_6);
16439  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16440  }
16441  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16442  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 795, __pyx_L1_error)
16443  __Pyx_GOTREF(__pyx_t_15);
16444  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_n_s_penalty, __pyx_t_6) < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
16445  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16446  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16447 
16448  /* "ADR.pyx":796
16449  *
16450  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16451  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16452  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16453  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16454  */
16455  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 796, __pyx_L1_error)
16456  __Pyx_GOTREF(__pyx_t_15);
16457  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L1_error)
16458  __Pyx_GOTREF(__pyx_t_2);
16459  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16460  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 796, __pyx_L1_error)
16461  __Pyx_GOTREF(__pyx_t_15);
16462  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error)
16463  __Pyx_GOTREF(__pyx_t_1);
16464  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16465  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 796, __pyx_L1_error)
16466  __Pyx_GOTREF(__pyx_t_15);
16467  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 796, __pyx_L1_error)
16468  __Pyx_GOTREF(__pyx_t_7);
16469  __Pyx_GIVEREF(__pyx_t_1);
16470  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
16471  __Pyx_GIVEREF(__pyx_t_15);
16472  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_15);
16473  __pyx_t_1 = 0;
16474  __pyx_t_15 = 0;
16475  __pyx_t_15 = NULL;
16476  __pyx_t_14 = 0;
16477  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
16478  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
16479  if (likely(__pyx_t_15)) {
16480  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
16481  __Pyx_INCREF(__pyx_t_15);
16482  __Pyx_INCREF(function);
16483  __Pyx_DECREF_SET(__pyx_t_2, function);
16484  __pyx_t_14 = 1;
16485  }
16486  }
16487  #if CYTHON_FAST_PYCALL
16488  if (PyFunction_Check(__pyx_t_2)) {
16489  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_7, __pyx_n_s_d};
16490  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 796, __pyx_L1_error)
16491  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
16492  __Pyx_GOTREF(__pyx_t_6);
16493  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16494  } else
16495  #endif
16496  #if CYTHON_FAST_PYCCALL
16497  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
16498  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_7, __pyx_n_s_d};
16499  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 796, __pyx_L1_error)
16500  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
16501  __Pyx_GOTREF(__pyx_t_6);
16502  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16503  } else
16504  #endif
16505  {
16506  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error)
16507  __Pyx_GOTREF(__pyx_t_1);
16508  if (__pyx_t_15) {
16509  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15); __pyx_t_15 = NULL;
16510  }
16511  __Pyx_GIVEREF(__pyx_t_7);
16512  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_7);
16513  __Pyx_INCREF(__pyx_n_s_d);
16514  __Pyx_GIVEREF(__pyx_n_s_d);
16515  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_n_s_d);
16516  __pyx_t_7 = 0;
16517  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 796, __pyx_L1_error)
16518  __Pyx_GOTREF(__pyx_t_6);
16519  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16520  }
16521  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16522  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L1_error)
16523  __Pyx_GOTREF(__pyx_t_2);
16524  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_tuple__35, __pyx_t_6) < 0)) __PYX_ERR(0, 796, __pyx_L1_error)
16525  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16526  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16527 
16528  /* "ADR.pyx":797
16529  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16530  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16531  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i') # <<<<<<<<<<<<<<
16532  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16533  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16534  */
16535  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
16536  __Pyx_GOTREF(__pyx_t_2);
16537  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error)
16538  __Pyx_GOTREF(__pyx_t_1);
16539  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16540  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
16541  __Pyx_GOTREF(__pyx_t_2);
16542  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 797, __pyx_L1_error)
16543  __Pyx_GOTREF(__pyx_t_7);
16544  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16545  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
16546  __Pyx_GOTREF(__pyx_t_2);
16547  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 797, __pyx_L1_error)
16548  __Pyx_GOTREF(__pyx_t_15);
16549  __Pyx_GIVEREF(__pyx_t_7);
16550  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
16551  __Pyx_GIVEREF(__pyx_t_2);
16552  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_2);
16553  __pyx_t_7 = 0;
16554  __pyx_t_2 = 0;
16555  __pyx_t_2 = NULL;
16556  __pyx_t_14 = 0;
16557  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
16558  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
16559  if (likely(__pyx_t_2)) {
16560  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
16561  __Pyx_INCREF(__pyx_t_2);
16562  __Pyx_INCREF(function);
16563  __Pyx_DECREF_SET(__pyx_t_1, function);
16564  __pyx_t_14 = 1;
16565  }
16566  }
16567  #if CYTHON_FAST_PYCALL
16568  if (PyFunction_Check(__pyx_t_1)) {
16569  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_n_s_i};
16570  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 797, __pyx_L1_error)
16571  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16572  __Pyx_GOTREF(__pyx_t_6);
16573  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16574  } else
16575  #endif
16576  #if CYTHON_FAST_PYCCALL
16577  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
16578  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_n_s_i};
16579  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 797, __pyx_L1_error)
16580  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16581  __Pyx_GOTREF(__pyx_t_6);
16582  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16583  } else
16584  #endif
16585  {
16586  __pyx_t_7 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 797, __pyx_L1_error)
16587  __Pyx_GOTREF(__pyx_t_7);
16588  if (__pyx_t_2) {
16589  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
16590  }
16591  __Pyx_GIVEREF(__pyx_t_15);
16592  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_14, __pyx_t_15);
16593  __Pyx_INCREF(__pyx_n_s_i);
16594  __Pyx_GIVEREF(__pyx_n_s_i);
16595  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_14, __pyx_n_s_i);
16596  __pyx_t_15 = 0;
16597  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 797, __pyx_L1_error)
16598  __Pyx_GOTREF(__pyx_t_6);
16599  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16600  }
16601  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16602  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error)
16603  __Pyx_GOTREF(__pyx_t_1);
16604  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_tuple__36, __pyx_t_6) < 0)) __PYX_ERR(0, 797, __pyx_L1_error)
16605  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16606  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16607 
16608  /* "ADR.pyx":798
16609  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16610  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16611  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16612  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16613  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16614  */
16615  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
16616  __Pyx_GOTREF(__pyx_t_1);
16617  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 798, __pyx_L1_error)
16618  __Pyx_GOTREF(__pyx_t_7);
16619  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16620  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
16621  __Pyx_GOTREF(__pyx_t_1);
16622  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 798, __pyx_L1_error)
16623  __Pyx_GOTREF(__pyx_t_15);
16624  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16625  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
16626  __Pyx_GOTREF(__pyx_t_1);
16627  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 798, __pyx_L1_error)
16628  __Pyx_GOTREF(__pyx_t_2);
16629  __Pyx_GIVEREF(__pyx_t_15);
16630  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15);
16631  __Pyx_GIVEREF(__pyx_t_1);
16632  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
16633  __pyx_t_15 = 0;
16634  __pyx_t_1 = 0;
16635  __pyx_t_1 = NULL;
16636  __pyx_t_14 = 0;
16637  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
16638  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
16639  if (likely(__pyx_t_1)) {
16640  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
16641  __Pyx_INCREF(__pyx_t_1);
16642  __Pyx_INCREF(function);
16643  __Pyx_DECREF_SET(__pyx_t_7, function);
16644  __pyx_t_14 = 1;
16645  }
16646  }
16647  #if CYTHON_FAST_PYCALL
16648  if (PyFunction_Check(__pyx_t_7)) {
16649  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_n_s_d};
16650  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 798, __pyx_L1_error)
16651  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16652  __Pyx_GOTREF(__pyx_t_6);
16653  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16654  } else
16655  #endif
16656  #if CYTHON_FAST_PYCCALL
16657  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
16658  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_n_s_d};
16659  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 798, __pyx_L1_error)
16660  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16661  __Pyx_GOTREF(__pyx_t_6);
16662  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16663  } else
16664  #endif
16665  {
16666  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 798, __pyx_L1_error)
16667  __Pyx_GOTREF(__pyx_t_15);
16668  if (__pyx_t_1) {
16669  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __pyx_t_1 = NULL;
16670  }
16671  __Pyx_GIVEREF(__pyx_t_2);
16672  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_2);
16673  __Pyx_INCREF(__pyx_n_s_d);
16674  __Pyx_GIVEREF(__pyx_n_s_d);
16675  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_n_s_d);
16676  __pyx_t_2 = 0;
16677  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 798, __pyx_L1_error)
16678  __Pyx_GOTREF(__pyx_t_6);
16679  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16680  }
16681  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16682  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 798, __pyx_L1_error)
16683  __Pyx_GOTREF(__pyx_t_7);
16684  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_tuple__37, __pyx_t_6) < 0)) __PYX_ERR(0, 798, __pyx_L1_error)
16685  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16686  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16687 
16688  /* "ADR.pyx":799
16689  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16690  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16691  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i') # <<<<<<<<<<<<<<
16692  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16693  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16694  */
16695  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 799, __pyx_L1_error)
16696  __Pyx_GOTREF(__pyx_t_7);
16697  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 799, __pyx_L1_error)
16698  __Pyx_GOTREF(__pyx_t_15);
16699  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16700  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 799, __pyx_L1_error)
16701  __Pyx_GOTREF(__pyx_t_7);
16702  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error)
16703  __Pyx_GOTREF(__pyx_t_2);
16704  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16705  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 799, __pyx_L1_error)
16706  __Pyx_GOTREF(__pyx_t_7);
16707  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error)
16708  __Pyx_GOTREF(__pyx_t_1);
16709  __Pyx_GIVEREF(__pyx_t_2);
16710  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
16711  __Pyx_GIVEREF(__pyx_t_7);
16712  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
16713  __pyx_t_2 = 0;
16714  __pyx_t_7 = 0;
16715  __pyx_t_7 = NULL;
16716  __pyx_t_14 = 0;
16717  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
16718  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_15);
16719  if (likely(__pyx_t_7)) {
16720  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
16721  __Pyx_INCREF(__pyx_t_7);
16722  __Pyx_INCREF(function);
16723  __Pyx_DECREF_SET(__pyx_t_15, function);
16724  __pyx_t_14 = 1;
16725  }
16726  }
16727  #if CYTHON_FAST_PYCALL
16728  if (PyFunction_Check(__pyx_t_15)) {
16729  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_i};
16730  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error)
16731  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16732  __Pyx_GOTREF(__pyx_t_6);
16733  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16734  } else
16735  #endif
16736  #if CYTHON_FAST_PYCCALL
16737  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
16738  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_i};
16739  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error)
16740  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16741  __Pyx_GOTREF(__pyx_t_6);
16742  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16743  } else
16744  #endif
16745  {
16746  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error)
16747  __Pyx_GOTREF(__pyx_t_2);
16748  if (__pyx_t_7) {
16749  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
16750  }
16751  __Pyx_GIVEREF(__pyx_t_1);
16752  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_t_1);
16753  __Pyx_INCREF(__pyx_n_s_i);
16754  __Pyx_GIVEREF(__pyx_n_s_i);
16755  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_n_s_i);
16756  __pyx_t_1 = 0;
16757  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error)
16758  __Pyx_GOTREF(__pyx_t_6);
16759  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16760  }
16761  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16762  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 799, __pyx_L1_error)
16763  __Pyx_GOTREF(__pyx_t_15);
16764  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_tuple__38, __pyx_t_6) < 0)) __PYX_ERR(0, 799, __pyx_L1_error)
16765  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16766  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16767 
16768  /* "ADR.pyx":800
16769  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16770  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16771  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16772  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16773  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
16774  */
16775  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 800, __pyx_L1_error)
16776  __Pyx_GOTREF(__pyx_t_15);
16777  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error)
16778  __Pyx_GOTREF(__pyx_t_2);
16779  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16780  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 800, __pyx_L1_error)
16781  __Pyx_GOTREF(__pyx_t_15);
16782  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error)
16783  __Pyx_GOTREF(__pyx_t_1);
16784  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16785  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 800, __pyx_L1_error)
16786  __Pyx_GOTREF(__pyx_t_15);
16787  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 800, __pyx_L1_error)
16788  __Pyx_GOTREF(__pyx_t_7);
16789  __Pyx_GIVEREF(__pyx_t_1);
16790  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
16791  __Pyx_GIVEREF(__pyx_t_15);
16792  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_15);
16793  __pyx_t_1 = 0;
16794  __pyx_t_15 = 0;
16795  __pyx_t_15 = NULL;
16796  __pyx_t_14 = 0;
16797  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
16798  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
16799  if (likely(__pyx_t_15)) {
16800  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
16801  __Pyx_INCREF(__pyx_t_15);
16802  __Pyx_INCREF(function);
16803  __Pyx_DECREF_SET(__pyx_t_2, function);
16804  __pyx_t_14 = 1;
16805  }
16806  }
16807  #if CYTHON_FAST_PYCALL
16808  if (PyFunction_Check(__pyx_t_2)) {
16809  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_7, __pyx_n_s_d};
16810  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error)
16811  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
16812  __Pyx_GOTREF(__pyx_t_6);
16813  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16814  } else
16815  #endif
16816  #if CYTHON_FAST_PYCCALL
16817  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
16818  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_7, __pyx_n_s_d};
16819  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error)
16820  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
16821  __Pyx_GOTREF(__pyx_t_6);
16822  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16823  } else
16824  #endif
16825  {
16826  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error)
16827  __Pyx_GOTREF(__pyx_t_1);
16828  if (__pyx_t_15) {
16829  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15); __pyx_t_15 = NULL;
16830  }
16831  __Pyx_GIVEREF(__pyx_t_7);
16832  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_7);
16833  __Pyx_INCREF(__pyx_n_s_d);
16834  __Pyx_GIVEREF(__pyx_n_s_d);
16835  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_n_s_d);
16836  __pyx_t_7 = 0;
16837  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error)
16838  __Pyx_GOTREF(__pyx_t_6);
16839  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16840  }
16841  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16842  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error)
16843  __Pyx_GOTREF(__pyx_t_2);
16844  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_tuple__39, __pyx_t_6) < 0)) __PYX_ERR(0, 800, __pyx_L1_error)
16845  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16846  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16847 
16848  /* "ADR.pyx":801
16849  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16850  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16851  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d') # <<<<<<<<<<<<<<
16852  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
16853  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16854  */
16855  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L1_error)
16856  __Pyx_GOTREF(__pyx_t_2);
16857  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L1_error)
16858  __Pyx_GOTREF(__pyx_t_1);
16859  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16860  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L1_error)
16861  __Pyx_GOTREF(__pyx_t_2);
16862  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 801, __pyx_L1_error)
16863  __Pyx_GOTREF(__pyx_t_7);
16864  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16865  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L1_error)
16866  __Pyx_GOTREF(__pyx_t_2);
16867  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 801, __pyx_L1_error)
16868  __Pyx_GOTREF(__pyx_t_15);
16869  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 801, __pyx_L1_error)
16870  __Pyx_GOTREF(__pyx_t_8);
16871  __Pyx_GIVEREF(__pyx_t_7);
16872  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
16873  __Pyx_GIVEREF(__pyx_t_2);
16874  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
16875  __Pyx_GIVEREF(__pyx_t_15);
16876  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_15);
16877  __pyx_t_7 = 0;
16878  __pyx_t_2 = 0;
16879  __pyx_t_15 = 0;
16880  __pyx_t_15 = NULL;
16881  __pyx_t_14 = 0;
16882  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
16883  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_1);
16884  if (likely(__pyx_t_15)) {
16885  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
16886  __Pyx_INCREF(__pyx_t_15);
16887  __Pyx_INCREF(function);
16888  __Pyx_DECREF_SET(__pyx_t_1, function);
16889  __pyx_t_14 = 1;
16890  }
16891  }
16892  #if CYTHON_FAST_PYCALL
16893  if (PyFunction_Check(__pyx_t_1)) {
16894  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_n_s_d};
16895  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 801, __pyx_L1_error)
16896  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
16897  __Pyx_GOTREF(__pyx_t_6);
16898  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16899  } else
16900  #endif
16901  #if CYTHON_FAST_PYCCALL
16902  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
16903  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_n_s_d};
16904  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 801, __pyx_L1_error)
16905  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
16906  __Pyx_GOTREF(__pyx_t_6);
16907  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16908  } else
16909  #endif
16910  {
16911  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L1_error)
16912  __Pyx_GOTREF(__pyx_t_2);
16913  if (__pyx_t_15) {
16914  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15); __pyx_t_15 = NULL;
16915  }
16916  __Pyx_GIVEREF(__pyx_t_8);
16917  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_t_8);
16918  __Pyx_INCREF(__pyx_n_s_d);
16919  __Pyx_GIVEREF(__pyx_n_s_d);
16920  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_n_s_d);
16921  __pyx_t_8 = 0;
16922  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 801, __pyx_L1_error)
16923  __Pyx_GOTREF(__pyx_t_6);
16924  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16925  }
16926  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16927  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L1_error)
16928  __Pyx_GOTREF(__pyx_t_1);
16929  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_tuple__40, __pyx_t_6) < 0)) __PYX_ERR(0, 801, __pyx_L1_error)
16930  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16931  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16932 
16933  /* "ADR.pyx":802
16934  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16935  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16936  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d') # <<<<<<<<<<<<<<
16937  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16938  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16939  */
16940  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
16941  __Pyx_GOTREF(__pyx_t_1);
16942  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error)
16943  __Pyx_GOTREF(__pyx_t_2);
16944  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16945  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
16946  __Pyx_GOTREF(__pyx_t_1);
16947  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 802, __pyx_L1_error)
16948  __Pyx_GOTREF(__pyx_t_8);
16949  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16950  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
16951  __Pyx_GOTREF(__pyx_t_1);
16952  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 802, __pyx_L1_error)
16953  __Pyx_GOTREF(__pyx_t_15);
16954  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 802, __pyx_L1_error)
16955  __Pyx_GOTREF(__pyx_t_7);
16956  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16957  __pyx_t_15 = PyObject_GetItem(__pyx_t_7, __pyx_tuple__41); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 802, __pyx_L1_error)
16958  __Pyx_GOTREF(__pyx_t_15);
16959  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16960  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 802, __pyx_L1_error)
16961  __Pyx_GOTREF(__pyx_t_7);
16962  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16963  __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_7, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 802, __pyx_L1_error)
16964  __Pyx_GOTREF(__pyx_t_15);
16965  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16966  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 802, __pyx_L1_error)
16967  __Pyx_GOTREF(__pyx_t_7);
16968  __Pyx_GIVEREF(__pyx_t_8);
16969  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
16970  __Pyx_GIVEREF(__pyx_t_1);
16971  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
16972  __Pyx_GIVEREF(__pyx_t_15);
16973  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_15);
16974  __pyx_t_8 = 0;
16975  __pyx_t_1 = 0;
16976  __pyx_t_15 = 0;
16977  __pyx_t_15 = NULL;
16978  __pyx_t_14 = 0;
16979  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
16980  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
16981  if (likely(__pyx_t_15)) {
16982  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
16983  __Pyx_INCREF(__pyx_t_15);
16984  __Pyx_INCREF(function);
16985  __Pyx_DECREF_SET(__pyx_t_2, function);
16986  __pyx_t_14 = 1;
16987  }
16988  }
16989  #if CYTHON_FAST_PYCALL
16990  if (PyFunction_Check(__pyx_t_2)) {
16991  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_7, __pyx_n_s_d};
16992  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
16993  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
16994  __Pyx_GOTREF(__pyx_t_6);
16995  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16996  } else
16997  #endif
16998  #if CYTHON_FAST_PYCCALL
16999  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
17000  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_7, __pyx_n_s_d};
17001  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
17002  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
17003  __Pyx_GOTREF(__pyx_t_6);
17004  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17005  } else
17006  #endif
17007  {
17008  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
17009  __Pyx_GOTREF(__pyx_t_1);
17010  if (__pyx_t_15) {
17011  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15); __pyx_t_15 = NULL;
17012  }
17013  __Pyx_GIVEREF(__pyx_t_7);
17014  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_7);
17015  __Pyx_INCREF(__pyx_n_s_d);
17016  __Pyx_GIVEREF(__pyx_n_s_d);
17017  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_n_s_d);
17018  __pyx_t_7 = 0;
17019  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
17020  __Pyx_GOTREF(__pyx_t_6);
17021  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17022  }
17023  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17024  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error)
17025  __Pyx_GOTREF(__pyx_t_2);
17026  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_tuple__42, __pyx_t_6) < 0)) __PYX_ERR(0, 802, __pyx_L1_error)
17027  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17028  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17029 
17030  /* "ADR.pyx":803
17031  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
17032  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
17033  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d') # <<<<<<<<<<<<<<
17034  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17035  *
17036  */
17037  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
17038  __Pyx_GOTREF(__pyx_t_2);
17039  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error)
17040  __Pyx_GOTREF(__pyx_t_1);
17041  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17042  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
17043  __Pyx_GOTREF(__pyx_t_2);
17044  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 803, __pyx_L1_error)
17045  __Pyx_GOTREF(__pyx_t_7);
17046  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17047  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
17048  __Pyx_GOTREF(__pyx_t_2);
17049  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 803, __pyx_L1_error)
17050  __Pyx_GOTREF(__pyx_t_15);
17051  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 803, __pyx_L1_error)
17052  __Pyx_GOTREF(__pyx_t_8);
17053  __Pyx_GIVEREF(__pyx_t_7);
17054  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
17055  __Pyx_GIVEREF(__pyx_t_2);
17056  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
17057  __Pyx_GIVEREF(__pyx_t_15);
17058  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_15);
17059  __pyx_t_7 = 0;
17060  __pyx_t_2 = 0;
17061  __pyx_t_15 = 0;
17062  __pyx_t_15 = NULL;
17063  __pyx_t_14 = 0;
17064  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
17065  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_1);
17066  if (likely(__pyx_t_15)) {
17067  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
17068  __Pyx_INCREF(__pyx_t_15);
17069  __Pyx_INCREF(function);
17070  __Pyx_DECREF_SET(__pyx_t_1, function);
17071  __pyx_t_14 = 1;
17072  }
17073  }
17074  #if CYTHON_FAST_PYCALL
17075  if (PyFunction_Check(__pyx_t_1)) {
17076  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_n_s_d};
17077  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
17078  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
17079  __Pyx_GOTREF(__pyx_t_6);
17080  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17081  } else
17082  #endif
17083  #if CYTHON_FAST_PYCCALL
17084  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
17085  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_n_s_d};
17086  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
17087  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
17088  __Pyx_GOTREF(__pyx_t_6);
17089  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17090  } else
17091  #endif
17092  {
17093  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
17094  __Pyx_GOTREF(__pyx_t_2);
17095  if (__pyx_t_15) {
17096  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15); __pyx_t_15 = NULL;
17097  }
17098  __Pyx_GIVEREF(__pyx_t_8);
17099  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_t_8);
17100  __Pyx_INCREF(__pyx_n_s_d);
17101  __Pyx_GIVEREF(__pyx_n_s_d);
17102  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_n_s_d);
17103  __pyx_t_8 = 0;
17104  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
17105  __Pyx_GOTREF(__pyx_t_6);
17106  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17107  }
17108  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17109  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error)
17110  __Pyx_GOTREF(__pyx_t_1);
17111  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_tuple__43, __pyx_t_6) < 0)) __PYX_ERR(0, 803, __pyx_L1_error)
17112  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17113  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17114 
17115  /* "ADR.pyx":804
17116  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
17117  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
17118  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
17119  *
17120  * self.points_elementBoundaryQuadrature= set()
17121  */
17122  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error)
17123  __Pyx_GOTREF(__pyx_t_1);
17124  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 804, __pyx_L1_error)
17125  __Pyx_GOTREF(__pyx_t_2);
17126  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17127  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error)
17128  __Pyx_GOTREF(__pyx_t_1);
17129  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 804, __pyx_L1_error)
17130  __Pyx_GOTREF(__pyx_t_8);
17131  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17132  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error)
17133  __Pyx_GOTREF(__pyx_t_1);
17134  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 804, __pyx_L1_error)
17135  __Pyx_GOTREF(__pyx_t_15);
17136  __Pyx_GIVEREF(__pyx_t_8);
17137  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8);
17138  __Pyx_GIVEREF(__pyx_t_1);
17139  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_1);
17140  __pyx_t_8 = 0;
17141  __pyx_t_1 = 0;
17142  __pyx_t_1 = NULL;
17143  __pyx_t_14 = 0;
17144  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
17145  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
17146  if (likely(__pyx_t_1)) {
17147  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
17148  __Pyx_INCREF(__pyx_t_1);
17149  __Pyx_INCREF(function);
17150  __Pyx_DECREF_SET(__pyx_t_2, function);
17151  __pyx_t_14 = 1;
17152  }
17153  }
17154  #if CYTHON_FAST_PYCALL
17155  if (PyFunction_Check(__pyx_t_2)) {
17156  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_n_s_d};
17157  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
17158  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17159  __Pyx_GOTREF(__pyx_t_6);
17160  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17161  } else
17162  #endif
17163  #if CYTHON_FAST_PYCCALL
17164  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
17165  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_n_s_d};
17166  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
17167  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17168  __Pyx_GOTREF(__pyx_t_6);
17169  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17170  } else
17171  #endif
17172  {
17173  __pyx_t_8 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 804, __pyx_L1_error)
17174  __Pyx_GOTREF(__pyx_t_8);
17175  if (__pyx_t_1) {
17176  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
17177  }
17178  __Pyx_GIVEREF(__pyx_t_15);
17179  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_14, __pyx_t_15);
17180  __Pyx_INCREF(__pyx_n_s_d);
17181  __Pyx_GIVEREF(__pyx_n_s_d);
17182  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_14, __pyx_n_s_d);
17183  __pyx_t_15 = 0;
17184  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
17185  __Pyx_GOTREF(__pyx_t_6);
17186  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17187  }
17188  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17189  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 804, __pyx_L1_error)
17190  __Pyx_GOTREF(__pyx_t_2);
17191  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_tuple__44, __pyx_t_6) < 0)) __PYX_ERR(0, 804, __pyx_L1_error)
17192  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17193  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17194 
17195  /* "ADR.pyx":806
17196  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17197  *
17198  * self.points_elementBoundaryQuadrature= set() # <<<<<<<<<<<<<<
17199  * self.scalars_elementBoundaryQuadrature= set([('u',ci) for ci in range(self.nc)])
17200  * self.vectors_elementBoundaryQuadrature= set()
17201  */
17202  __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L1_error)
17203  __Pyx_GOTREF(__pyx_t_6);
17204  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_points_elementBoundaryQuadrature, __pyx_t_6) < 0) __PYX_ERR(0, 806, __pyx_L1_error)
17205  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17206 
17207  /* "ADR.pyx":807
17208  *
17209  * self.points_elementBoundaryQuadrature= set()
17210  * self.scalars_elementBoundaryQuadrature= set([('u',ci) for ci in range(self.nc)]) # <<<<<<<<<<<<<<
17211  * self.vectors_elementBoundaryQuadrature= set()
17212  * self.tensors_elementBoundaryQuadrature= set()
17213  */
17214  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 807, __pyx_L1_error)
17215  __Pyx_GOTREF(__pyx_t_6);
17216  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)
17217  __Pyx_GOTREF(__pyx_t_2);
17218  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 807, __pyx_L1_error)
17219  __Pyx_GOTREF(__pyx_t_8);
17220  __Pyx_GIVEREF(__pyx_t_2);
17221  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
17222  __pyx_t_2 = 0;
17223  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)
17224  __Pyx_GOTREF(__pyx_t_2);
17225  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17226  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
17227  __pyx_t_8 = __pyx_t_2; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
17228  __pyx_t_5 = NULL;
17229  } else {
17230  __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 807, __pyx_L1_error)
17231  __Pyx_GOTREF(__pyx_t_8);
17232  __pyx_t_5 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 807, __pyx_L1_error)
17233  }
17234  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17235  for (;;) {
17236  if (likely(!__pyx_t_5)) {
17237  if (likely(PyList_CheckExact(__pyx_t_8))) {
17238  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
17239  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17240  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 807, __pyx_L1_error)
17241  #else
17242  __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)
17243  __Pyx_GOTREF(__pyx_t_2);
17244  #endif
17245  } else {
17246  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
17247  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17248  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 807, __pyx_L1_error)
17249  #else
17250  __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)
17251  __Pyx_GOTREF(__pyx_t_2);
17252  #endif
17253  }
17254  } else {
17255  __pyx_t_2 = __pyx_t_5(__pyx_t_8);
17256  if (unlikely(!__pyx_t_2)) {
17257  PyObject* exc_type = PyErr_Occurred();
17258  if (exc_type) {
17259  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17260  else __PYX_ERR(0, 807, __pyx_L1_error)
17261  }
17262  break;
17263  }
17264  __Pyx_GOTREF(__pyx_t_2);
17265  }
17266  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_2);
17267  __pyx_t_2 = 0;
17268  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)
17269  __Pyx_GOTREF(__pyx_t_2);
17270  __Pyx_INCREF(__pyx_n_s_u);
17271  __Pyx_GIVEREF(__pyx_n_s_u);
17272  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_u);
17273  __Pyx_INCREF(__pyx_v_ci);
17274  __Pyx_GIVEREF(__pyx_v_ci);
17275  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ci);
17276  if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 807, __pyx_L1_error)
17277  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17278  }
17279  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17280  __pyx_t_8 = PySet_New(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 807, __pyx_L1_error)
17281  __Pyx_GOTREF(__pyx_t_8);
17282  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17283  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_scalars_elementBoundaryQuadratur, __pyx_t_8) < 0) __PYX_ERR(0, 807, __pyx_L1_error)
17284  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17285 
17286  /* "ADR.pyx":808
17287  * self.points_elementBoundaryQuadrature= set()
17288  * self.scalars_elementBoundaryQuadrature= set([('u',ci) for ci in range(self.nc)])
17289  * self.vectors_elementBoundaryQuadrature= set() # <<<<<<<<<<<<<<
17290  * self.tensors_elementBoundaryQuadrature= set()
17291  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4)
17292  */
17293  __pyx_t_8 = PySet_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 808, __pyx_L1_error)
17294  __Pyx_GOTREF(__pyx_t_8);
17295  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vectors_elementBoundaryQuadratur, __pyx_t_8) < 0) __PYX_ERR(0, 808, __pyx_L1_error)
17296  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17297 
17298  /* "ADR.pyx":809
17299  * self.scalars_elementBoundaryQuadrature= set([('u',ci) for ci in range(self.nc)])
17300  * self.vectors_elementBoundaryQuadrature= set()
17301  * self.tensors_elementBoundaryQuadrature= set() # <<<<<<<<<<<<<<
17302  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4)
17303  * self.inflowBoundaryBC = {}
17304  */
17305  __pyx_t_8 = PySet_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 809, __pyx_L1_error)
17306  __Pyx_GOTREF(__pyx_t_8);
17307  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tensors_elementBoundaryQuadratur, __pyx_t_8) < 0) __PYX_ERR(0, 809, __pyx_L1_error)
17308  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17309 
17310  /* "ADR.pyx":810
17311  * self.vectors_elementBoundaryQuadrature= set()
17312  * self.tensors_elementBoundaryQuadrature= set()
17313  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
17314  * self.inflowBoundaryBC = {}
17315  * self.inflowBoundaryBC_values = {}
17316  */
17317  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 810, __pyx_L1_error)
17318  __Pyx_GOTREF(__pyx_t_8);
17319  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_memory); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
17320  __Pyx_GOTREF(__pyx_t_6);
17321  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error)
17322  __Pyx_GOTREF(__pyx_t_2);
17323  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17324  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
17325  __Pyx_GOTREF(__pyx_t_6);
17326  __Pyx_GIVEREF(__pyx_t_2);
17327  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
17328  __pyx_t_2 = 0;
17329  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error)
17330  __Pyx_GOTREF(__pyx_t_2);
17331  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(0, 810, __pyx_L1_error)
17332  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 810, __pyx_L1_error)
17333  __Pyx_GOTREF(__pyx_t_15);
17334  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17335  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17336  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17337  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17338 
17339  /* "ADR.pyx":811
17340  * self.tensors_elementBoundaryQuadrature= set()
17341  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4)
17342  * self.inflowBoundaryBC = {} # <<<<<<<<<<<<<<
17343  * self.inflowBoundaryBC_values = {}
17344  * self.inflowFlux = {}
17345  */
17346  __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 811, __pyx_L1_error)
17347  __Pyx_GOTREF(__pyx_t_15);
17348  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inflowBoundaryBC, __pyx_t_15) < 0) __PYX_ERR(0, 811, __pyx_L1_error)
17349  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17350 
17351  /* "ADR.pyx":812
17352  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4)
17353  * self.inflowBoundaryBC = {}
17354  * self.inflowBoundaryBC_values = {} # <<<<<<<<<<<<<<
17355  * self.inflowFlux = {}
17356  * for cj in range(self.nc):
17357  */
17358  __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 812, __pyx_L1_error)
17359  __Pyx_GOTREF(__pyx_t_15);
17360  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inflowBoundaryBC_values, __pyx_t_15) < 0) __PYX_ERR(0, 812, __pyx_L1_error)
17361  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17362 
17363  /* "ADR.pyx":813
17364  * self.inflowBoundaryBC = {}
17365  * self.inflowBoundaryBC_values = {}
17366  * self.inflowFlux = {} # <<<<<<<<<<<<<<
17367  * for cj in range(self.nc):
17368  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17369  */
17370  __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 813, __pyx_L1_error)
17371  __Pyx_GOTREF(__pyx_t_15);
17372  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inflowFlux, __pyx_t_15) < 0) __PYX_ERR(0, 813, __pyx_L1_error)
17373  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17374 
17375  /* "ADR.pyx":814
17376  * self.inflowBoundaryBC_values = {}
17377  * self.inflowFlux = {}
17378  * for cj in range(self.nc): # <<<<<<<<<<<<<<
17379  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17380  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17381  */
17382  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 814, __pyx_L1_error)
17383  __Pyx_GOTREF(__pyx_t_15);
17384  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
17385  __Pyx_GOTREF(__pyx_t_2);
17386  __Pyx_GIVEREF(__pyx_t_15);
17387  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15);
17388  __pyx_t_15 = 0;
17389  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 814, __pyx_L1_error)
17390  __Pyx_GOTREF(__pyx_t_15);
17391  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17392  if (likely(PyList_CheckExact(__pyx_t_15)) || PyTuple_CheckExact(__pyx_t_15)) {
17393  __pyx_t_2 = __pyx_t_15; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
17394  __pyx_t_5 = NULL;
17395  } else {
17396  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
17397  __Pyx_GOTREF(__pyx_t_2);
17398  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 814, __pyx_L1_error)
17399  }
17400  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17401  for (;;) {
17402  if (likely(!__pyx_t_5)) {
17403  if (likely(PyList_CheckExact(__pyx_t_2))) {
17404  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
17405  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17406  __pyx_t_15 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_15); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 814, __pyx_L1_error)
17407  #else
17408  __pyx_t_15 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 814, __pyx_L1_error)
17409  __Pyx_GOTREF(__pyx_t_15);
17410  #endif
17411  } else {
17412  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
17413  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17414  __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_15); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 814, __pyx_L1_error)
17415  #else
17416  __pyx_t_15 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 814, __pyx_L1_error)
17417  __Pyx_GOTREF(__pyx_t_15);
17418  #endif
17419  }
17420  } else {
17421  __pyx_t_15 = __pyx_t_5(__pyx_t_2);
17422  if (unlikely(!__pyx_t_15)) {
17423  PyObject* exc_type = PyErr_Occurred();
17424  if (exc_type) {
17425  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17426  else __PYX_ERR(0, 814, __pyx_L1_error)
17427  }
17428  break;
17429  }
17430  __Pyx_GOTREF(__pyx_t_15);
17431  }
17432  __Pyx_XDECREF_SET(__pyx_v_cj, __pyx_t_15);
17433  __pyx_t_15 = 0;
17434 
17435  /* "ADR.pyx":815
17436  * self.inflowFlux = {}
17437  * for cj in range(self.nc):
17438  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i') # <<<<<<<<<<<<<<
17439  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17440  * self.inflowFlux[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17441  */
17442  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 815, __pyx_L1_error)
17443  __Pyx_GOTREF(__pyx_t_6);
17444  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 815, __pyx_L1_error)
17445  __Pyx_GOTREF(__pyx_t_8);
17446  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17447  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 815, __pyx_L1_error)
17448  __Pyx_GOTREF(__pyx_t_6);
17449  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
17450  __Pyx_GOTREF(__pyx_t_1);
17451  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17452  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 815, __pyx_L1_error)
17453  __Pyx_GOTREF(__pyx_t_6);
17454  __Pyx_GIVEREF(__pyx_t_1);
17455  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
17456  __pyx_t_1 = 0;
17457  __pyx_t_1 = NULL;
17458  __pyx_t_14 = 0;
17459  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
17460  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
17461  if (likely(__pyx_t_1)) {
17462  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
17463  __Pyx_INCREF(__pyx_t_1);
17464  __Pyx_INCREF(function);
17465  __Pyx_DECREF_SET(__pyx_t_8, function);
17466  __pyx_t_14 = 1;
17467  }
17468  }
17469  #if CYTHON_FAST_PYCALL
17470  if (PyFunction_Check(__pyx_t_8)) {
17471  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_6, __pyx_n_s_i};
17472  __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 815, __pyx_L1_error)
17473  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17474  __Pyx_GOTREF(__pyx_t_15);
17475  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17476  } else
17477  #endif
17478  #if CYTHON_FAST_PYCCALL
17479  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
17480  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_6, __pyx_n_s_i};
17481  __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 815, __pyx_L1_error)
17482  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17483  __Pyx_GOTREF(__pyx_t_15);
17484  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17485  } else
17486  #endif
17487  {
17488  __pyx_t_7 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 815, __pyx_L1_error)
17489  __Pyx_GOTREF(__pyx_t_7);
17490  if (__pyx_t_1) {
17491  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
17492  }
17493  __Pyx_GIVEREF(__pyx_t_6);
17494  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_14, __pyx_t_6);
17495  __Pyx_INCREF(__pyx_n_s_i);
17496  __Pyx_GIVEREF(__pyx_n_s_i);
17497  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_14, __pyx_n_s_i);
17498  __pyx_t_6 = 0;
17499  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 815, __pyx_L1_error)
17500  __Pyx_GOTREF(__pyx_t_15);
17501  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17502  }
17503  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17504  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inflowBoundaryBC); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 815, __pyx_L1_error)
17505  __Pyx_GOTREF(__pyx_t_8);
17506  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_v_cj, __pyx_t_15) < 0)) __PYX_ERR(0, 815, __pyx_L1_error)
17507  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17508  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17509 
17510  /* "ADR.pyx":816
17511  * for cj in range(self.nc):
17512  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17513  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d') # <<<<<<<<<<<<<<
17514  * self.inflowFlux[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17515  * self.internalNodes = set(range(self.mesh.nNodes_global))
17516  */
17517  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 816, __pyx_L1_error)
17518  __Pyx_GOTREF(__pyx_t_8);
17519  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 816, __pyx_L1_error)
17520  __Pyx_GOTREF(__pyx_t_7);
17521  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17522  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 816, __pyx_L1_error)
17523  __Pyx_GOTREF(__pyx_t_8);
17524  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 816, __pyx_L1_error)
17525  __Pyx_GOTREF(__pyx_t_6);
17526  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17527  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 816, __pyx_L1_error)
17528  __Pyx_GOTREF(__pyx_t_8);
17529  __pyx_t_1 = PyObject_GetItem(__pyx_t_8, __pyx_v_cj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
17530  __Pyx_GOTREF(__pyx_t_1);
17531  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17532  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 816, __pyx_L1_error)
17533  __Pyx_GOTREF(__pyx_t_8);
17534  __Pyx_GIVEREF(__pyx_t_6);
17535  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
17536  __Pyx_GIVEREF(__pyx_t_1);
17537  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1);
17538  __pyx_t_6 = 0;
17539  __pyx_t_1 = 0;
17540  __pyx_t_1 = NULL;
17541  __pyx_t_14 = 0;
17542  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
17543  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
17544  if (likely(__pyx_t_1)) {
17545  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
17546  __Pyx_INCREF(__pyx_t_1);
17547  __Pyx_INCREF(function);
17548  __Pyx_DECREF_SET(__pyx_t_7, function);
17549  __pyx_t_14 = 1;
17550  }
17551  }
17552  #if CYTHON_FAST_PYCALL
17553  if (PyFunction_Check(__pyx_t_7)) {
17554  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_8, __pyx_n_s_d};
17555  __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 816, __pyx_L1_error)
17556  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17557  __Pyx_GOTREF(__pyx_t_15);
17558  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17559  } else
17560  #endif
17561  #if CYTHON_FAST_PYCCALL
17562  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
17563  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_8, __pyx_n_s_d};
17564  __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 816, __pyx_L1_error)
17565  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17566  __Pyx_GOTREF(__pyx_t_15);
17567  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17568  } else
17569  #endif
17570  {
17571  __pyx_t_6 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 816, __pyx_L1_error)
17572  __Pyx_GOTREF(__pyx_t_6);
17573  if (__pyx_t_1) {
17574  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
17575  }
17576  __Pyx_GIVEREF(__pyx_t_8);
17577  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_14, __pyx_t_8);
17578  __Pyx_INCREF(__pyx_n_s_d);
17579  __Pyx_GIVEREF(__pyx_n_s_d);
17580  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_14, __pyx_n_s_d);
17581  __pyx_t_8 = 0;
17582  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 816, __pyx_L1_error)
17583  __Pyx_GOTREF(__pyx_t_15);
17584  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17585  }
17586  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17587  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inflowBoundaryBC_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 816, __pyx_L1_error)
17588  __Pyx_GOTREF(__pyx_t_7);
17589  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_cj, __pyx_t_15) < 0)) __PYX_ERR(0, 816, __pyx_L1_error)
17590  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17591  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17592 
17593  /* "ADR.pyx":817
17594  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17595  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17596  * self.inflowFlux[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
17597  * self.internalNodes = set(range(self.mesh.nNodes_global))
17598  * #identify the internal nodes this is ought to be in mesh
17599  */
17600  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 817, __pyx_L1_error)
17601  __Pyx_GOTREF(__pyx_t_7);
17602  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 817, __pyx_L1_error)
17603  __Pyx_GOTREF(__pyx_t_6);
17604  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17605  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 817, __pyx_L1_error)
17606  __Pyx_GOTREF(__pyx_t_7);
17607  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 817, __pyx_L1_error)
17608  __Pyx_GOTREF(__pyx_t_8);
17609  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17610  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 817, __pyx_L1_error)
17611  __Pyx_GOTREF(__pyx_t_7);
17612  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
17613  __Pyx_GOTREF(__pyx_t_1);
17614  __Pyx_GIVEREF(__pyx_t_8);
17615  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
17616  __Pyx_GIVEREF(__pyx_t_7);
17617  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
17618  __pyx_t_8 = 0;
17619  __pyx_t_7 = 0;
17620  __pyx_t_7 = NULL;
17621  __pyx_t_14 = 0;
17622  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
17623  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
17624  if (likely(__pyx_t_7)) {
17625  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17626  __Pyx_INCREF(__pyx_t_7);
17627  __Pyx_INCREF(function);
17628  __Pyx_DECREF_SET(__pyx_t_6, function);
17629  __pyx_t_14 = 1;
17630  }
17631  }
17632  #if CYTHON_FAST_PYCALL
17633  if (PyFunction_Check(__pyx_t_6)) {
17634  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
17635  __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 817, __pyx_L1_error)
17636  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17637  __Pyx_GOTREF(__pyx_t_15);
17638  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17639  } else
17640  #endif
17641  #if CYTHON_FAST_PYCCALL
17642  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
17643  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
17644  __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 817, __pyx_L1_error)
17645  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17646  __Pyx_GOTREF(__pyx_t_15);
17647  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17648  } else
17649  #endif
17650  {
17651  __pyx_t_8 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 817, __pyx_L1_error)
17652  __Pyx_GOTREF(__pyx_t_8);
17653  if (__pyx_t_7) {
17654  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
17655  }
17656  __Pyx_GIVEREF(__pyx_t_1);
17657  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_14, __pyx_t_1);
17658  __Pyx_INCREF(__pyx_n_s_d);
17659  __Pyx_GIVEREF(__pyx_n_s_d);
17660  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_14, __pyx_n_s_d);
17661  __pyx_t_1 = 0;
17662  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 817, __pyx_L1_error)
17663  __Pyx_GOTREF(__pyx_t_15);
17664  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17665  }
17666  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17667  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inflowFlux); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 817, __pyx_L1_error)
17668  __Pyx_GOTREF(__pyx_t_6);
17669  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_cj, __pyx_t_15) < 0)) __PYX_ERR(0, 817, __pyx_L1_error)
17670  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17671  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17672 
17673  /* "ADR.pyx":814
17674  * self.inflowBoundaryBC_values = {}
17675  * self.inflowFlux = {}
17676  * for cj in range(self.nc): # <<<<<<<<<<<<<<
17677  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17678  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17679  */
17680  }
17681  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17682 
17683  /* "ADR.pyx":818
17684  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17685  * self.inflowFlux[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17686  * self.internalNodes = set(range(self.mesh.nNodes_global)) # <<<<<<<<<<<<<<
17687  * #identify the internal nodes this is ought to be in mesh
17688  * ##\todo move this to mesh
17689  */
17690  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error)
17691  __Pyx_GOTREF(__pyx_t_2);
17692  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nNodes_global); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 818, __pyx_L1_error)
17693  __Pyx_GOTREF(__pyx_t_15);
17694  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17695  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error)
17696  __Pyx_GOTREF(__pyx_t_2);
17697  __Pyx_GIVEREF(__pyx_t_15);
17698  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15);
17699  __pyx_t_15 = 0;
17700  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 818, __pyx_L1_error)
17701  __Pyx_GOTREF(__pyx_t_15);
17702  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17703  __pyx_t_2 = PySet_New(__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error)
17704  __Pyx_GOTREF(__pyx_t_2);
17705  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17706  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes, __pyx_t_2) < 0) __PYX_ERR(0, 818, __pyx_L1_error)
17707  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17708 
17709  /* "ADR.pyx":821
17710  * #identify the internal nodes this is ought to be in mesh
17711  * ##\todo move this to mesh
17712  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global): # <<<<<<<<<<<<<<
17713  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
17714  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17715  */
17716  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)
17717  __Pyx_GOTREF(__pyx_t_2);
17718  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 821, __pyx_L1_error)
17719  __Pyx_GOTREF(__pyx_t_15);
17720  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17721  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)
17722  __Pyx_GOTREF(__pyx_t_2);
17723  __Pyx_GIVEREF(__pyx_t_15);
17724  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15);
17725  __pyx_t_15 = 0;
17726  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 821, __pyx_L1_error)
17727  __Pyx_GOTREF(__pyx_t_15);
17728  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17729  if (likely(PyList_CheckExact(__pyx_t_15)) || PyTuple_CheckExact(__pyx_t_15)) {
17730  __pyx_t_2 = __pyx_t_15; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
17731  __pyx_t_5 = NULL;
17732  } else {
17733  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)
17734  __Pyx_GOTREF(__pyx_t_2);
17735  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 821, __pyx_L1_error)
17736  }
17737  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17738  for (;;) {
17739  if (likely(!__pyx_t_5)) {
17740  if (likely(PyList_CheckExact(__pyx_t_2))) {
17741  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
17742  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17743  __pyx_t_15 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_15); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 821, __pyx_L1_error)
17744  #else
17745  __pyx_t_15 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 821, __pyx_L1_error)
17746  __Pyx_GOTREF(__pyx_t_15);
17747  #endif
17748  } else {
17749  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
17750  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17751  __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_15); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 821, __pyx_L1_error)
17752  #else
17753  __pyx_t_15 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 821, __pyx_L1_error)
17754  __Pyx_GOTREF(__pyx_t_15);
17755  #endif
17756  }
17757  } else {
17758  __pyx_t_15 = __pyx_t_5(__pyx_t_2);
17759  if (unlikely(!__pyx_t_15)) {
17760  PyObject* exc_type = PyErr_Occurred();
17761  if (exc_type) {
17762  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17763  else __PYX_ERR(0, 821, __pyx_L1_error)
17764  }
17765  break;
17766  }
17767  __Pyx_GOTREF(__pyx_t_15);
17768  }
17769  __Pyx_XDECREF_SET(__pyx_v_ebNE, __pyx_t_15);
17770  __pyx_t_15 = 0;
17771 
17772  /* "ADR.pyx":822
17773  * ##\todo move this to mesh
17774  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
17775  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE] # <<<<<<<<<<<<<<
17776  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17777  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17778  */
17779  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 822, __pyx_L1_error)
17780  __Pyx_GOTREF(__pyx_t_15);
17781  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
17782  __Pyx_GOTREF(__pyx_t_6);
17783  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17784  __pyx_t_15 = PyObject_GetItem(__pyx_t_6, __pyx_v_ebNE); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 822, __pyx_L1_error)
17785  __Pyx_GOTREF(__pyx_t_15);
17786  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17787  __Pyx_XDECREF_SET(__pyx_v_ebN, __pyx_t_15);
17788  __pyx_t_15 = 0;
17789 
17790  /* "ADR.pyx":823
17791  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
17792  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
17793  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0] # <<<<<<<<<<<<<<
17794  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17795  * for i in range(self.mesh.nNodes_element):
17796  */
17797  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 823, __pyx_L1_error)
17798  __Pyx_GOTREF(__pyx_t_15);
17799  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_elementBoundaryElementsArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 823, __pyx_L1_error)
17800  __Pyx_GOTREF(__pyx_t_6);
17801  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17802  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 823, __pyx_L1_error)
17803  __Pyx_GOTREF(__pyx_t_15);
17804  __Pyx_INCREF(__pyx_v_ebN);
17805  __Pyx_GIVEREF(__pyx_v_ebN);
17806  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_ebN);
17807  __Pyx_INCREF(__pyx_int_0);
17808  __Pyx_GIVEREF(__pyx_int_0);
17809  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_int_0);
17810  __pyx_t_8 = PyObject_GetItem(__pyx_t_6, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 823, __pyx_L1_error)
17811  __Pyx_GOTREF(__pyx_t_8);
17812  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17813  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17814  __Pyx_XDECREF_SET(__pyx_v_eN_global, __pyx_t_8);
17815  __pyx_t_8 = 0;
17816 
17817  /* "ADR.pyx":824
17818  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
17819  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17820  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0] # <<<<<<<<<<<<<<
17821  * for i in range(self.mesh.nNodes_element):
17822  * if i != ebN_element:
17823  */
17824  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 824, __pyx_L1_error)
17825  __Pyx_GOTREF(__pyx_t_8);
17826  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_elementBoundaryLocalElementBound); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 824, __pyx_L1_error)
17827  __Pyx_GOTREF(__pyx_t_15);
17828  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17829  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 824, __pyx_L1_error)
17830  __Pyx_GOTREF(__pyx_t_8);
17831  __Pyx_INCREF(__pyx_v_ebN);
17832  __Pyx_GIVEREF(__pyx_v_ebN);
17833  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ebN);
17834  __Pyx_INCREF(__pyx_int_0);
17835  __Pyx_GIVEREF(__pyx_int_0);
17836  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_0);
17837  __pyx_t_6 = PyObject_GetItem(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 824, __pyx_L1_error)
17838  __Pyx_GOTREF(__pyx_t_6);
17839  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17840  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17841  __Pyx_XDECREF_SET(__pyx_v_ebN_element, __pyx_t_6);
17842  __pyx_t_6 = 0;
17843 
17844  /* "ADR.pyx":825
17845  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17846  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17847  * for i in range(self.mesh.nNodes_element): # <<<<<<<<<<<<<<
17848  * if i != ebN_element:
17849  * I = self.mesh.elementNodesArray[eN_global,i]
17850  */
17851  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error)
17852  __Pyx_GOTREF(__pyx_t_6);
17853  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nNodes_element); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 825, __pyx_L1_error)
17854  __Pyx_GOTREF(__pyx_t_8);
17855  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17856  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error)
17857  __Pyx_GOTREF(__pyx_t_6);
17858  __Pyx_GIVEREF(__pyx_t_8);
17859  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
17860  __pyx_t_8 = 0;
17861  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 825, __pyx_L1_error)
17862  __Pyx_GOTREF(__pyx_t_8);
17863  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17864  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
17865  __pyx_t_6 = __pyx_t_8; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0;
17866  __pyx_t_11 = NULL;
17867  } else {
17868  __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error)
17869  __Pyx_GOTREF(__pyx_t_6);
17870  __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 825, __pyx_L1_error)
17871  }
17872  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17873  for (;;) {
17874  if (likely(!__pyx_t_11)) {
17875  if (likely(PyList_CheckExact(__pyx_t_6))) {
17876  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
17877  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17878  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 825, __pyx_L1_error)
17879  #else
17880  __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 825, __pyx_L1_error)
17881  __Pyx_GOTREF(__pyx_t_8);
17882  #endif
17883  } else {
17884  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
17885  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17886  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 825, __pyx_L1_error)
17887  #else
17888  __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 825, __pyx_L1_error)
17889  __Pyx_GOTREF(__pyx_t_8);
17890  #endif
17891  }
17892  } else {
17893  __pyx_t_8 = __pyx_t_11(__pyx_t_6);
17894  if (unlikely(!__pyx_t_8)) {
17895  PyObject* exc_type = PyErr_Occurred();
17896  if (exc_type) {
17897  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17898  else __PYX_ERR(0, 825, __pyx_L1_error)
17899  }
17900  break;
17901  }
17902  __Pyx_GOTREF(__pyx_t_8);
17903  }
17904  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8);
17905  __pyx_t_8 = 0;
17906 
17907  /* "ADR.pyx":826
17908  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17909  * for i in range(self.mesh.nNodes_element):
17910  * if i != ebN_element: # <<<<<<<<<<<<<<
17911  * I = self.mesh.elementNodesArray[eN_global,i]
17912  * self.internalNodes -= set([I])
17913  */
17914  __pyx_t_8 = PyObject_RichCompare(__pyx_v_i, __pyx_v_ebN_element, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 826, __pyx_L1_error)
17915  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 826, __pyx_L1_error)
17916  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17917  if (__pyx_t_3) {
17918 
17919  /* "ADR.pyx":827
17920  * for i in range(self.mesh.nNodes_element):
17921  * if i != ebN_element:
17922  * I = self.mesh.elementNodesArray[eN_global,i] # <<<<<<<<<<<<<<
17923  * self.internalNodes -= set([I])
17924  * self.nNodes_internal = len(self.internalNodes)
17925  */
17926  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 827, __pyx_L1_error)
17927  __Pyx_GOTREF(__pyx_t_8);
17928  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 827, __pyx_L1_error)
17929  __Pyx_GOTREF(__pyx_t_15);
17930  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17931  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 827, __pyx_L1_error)
17932  __Pyx_GOTREF(__pyx_t_8);
17933  __Pyx_INCREF(__pyx_v_eN_global);
17934  __Pyx_GIVEREF(__pyx_v_eN_global);
17935  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_eN_global);
17936  __Pyx_INCREF(__pyx_v_i);
17937  __Pyx_GIVEREF(__pyx_v_i);
17938  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_i);
17939  __pyx_t_1 = PyObject_GetItem(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error)
17940  __Pyx_GOTREF(__pyx_t_1);
17941  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17942  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17943  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_1);
17944  __pyx_t_1 = 0;
17945 
17946  /* "ADR.pyx":828
17947  * if i != ebN_element:
17948  * I = self.mesh.elementNodesArray[eN_global,i]
17949  * self.internalNodes -= set([I]) # <<<<<<<<<<<<<<
17950  * self.nNodes_internal = len(self.internalNodes)
17951  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
17952  */
17953  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error)
17954  __Pyx_GOTREF(__pyx_t_1);
17955  __pyx_t_8 = PySet_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 828, __pyx_L1_error)
17956  __Pyx_GOTREF(__pyx_t_8);
17957  if (PySet_Add(__pyx_t_8, __pyx_v_I) < 0) __PYX_ERR(0, 828, __pyx_L1_error)
17958  __pyx_t_15 = PyNumber_InPlaceSubtract(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 828, __pyx_L1_error)
17959  __Pyx_GOTREF(__pyx_t_15);
17960  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17961  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17962  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes, __pyx_t_15) < 0) __PYX_ERR(0, 828, __pyx_L1_error)
17963  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17964 
17965  /* "ADR.pyx":826
17966  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17967  * for i in range(self.mesh.nNodes_element):
17968  * if i != ebN_element: # <<<<<<<<<<<<<<
17969  * I = self.mesh.elementNodesArray[eN_global,i]
17970  * self.internalNodes -= set([I])
17971  */
17972  }
17973 
17974  /* "ADR.pyx":825
17975  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17976  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17977  * for i in range(self.mesh.nNodes_element): # <<<<<<<<<<<<<<
17978  * if i != ebN_element:
17979  * I = self.mesh.elementNodesArray[eN_global,i]
17980  */
17981  }
17982  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17983 
17984  /* "ADR.pyx":821
17985  * #identify the internal nodes this is ought to be in mesh
17986  * ##\todo move this to mesh
17987  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global): # <<<<<<<<<<<<<<
17988  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
17989  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17990  */
17991  }
17992  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17993 
17994  /* "ADR.pyx":829
17995  * I = self.mesh.elementNodesArray[eN_global,i]
17996  * self.internalNodes -= set([I])
17997  * self.nNodes_internal = len(self.internalNodes) # <<<<<<<<<<<<<<
17998  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
17999  * for nI,n in enumerate(self.internalNodes):
18000  */
18001  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error)
18002  __Pyx_GOTREF(__pyx_t_2);
18003  __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 829, __pyx_L1_error)
18004  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18005  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error)
18006  __Pyx_GOTREF(__pyx_t_2);
18007  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nNodes_internal, __pyx_t_2) < 0) __PYX_ERR(0, 829, __pyx_L1_error)
18008  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18009 
18010  /* "ADR.pyx":830
18011  * self.internalNodes -= set([I])
18012  * self.nNodes_internal = len(self.internalNodes)
18013  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i') # <<<<<<<<<<<<<<
18014  * for nI,n in enumerate(self.internalNodes):
18015  * self.internalNodesArray[nI]=n
18016  */
18017  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 830, __pyx_L1_error)
18018  __Pyx_GOTREF(__pyx_t_6);
18019  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 830, __pyx_L1_error)
18020  __Pyx_GOTREF(__pyx_t_15);
18021  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18022  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nNodes_internal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 830, __pyx_L1_error)
18023  __Pyx_GOTREF(__pyx_t_6);
18024  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 830, __pyx_L1_error)
18025  __Pyx_GOTREF(__pyx_t_8);
18026  __Pyx_GIVEREF(__pyx_t_6);
18027  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
18028  __pyx_t_6 = 0;
18029  __pyx_t_6 = NULL;
18030  __pyx_t_14 = 0;
18031  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
18032  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15);
18033  if (likely(__pyx_t_6)) {
18034  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
18035  __Pyx_INCREF(__pyx_t_6);
18036  __Pyx_INCREF(function);
18037  __Pyx_DECREF_SET(__pyx_t_15, function);
18038  __pyx_t_14 = 1;
18039  }
18040  }
18041  #if CYTHON_FAST_PYCALL
18042  if (PyFunction_Check(__pyx_t_15)) {
18043  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_8, __pyx_n_s_i};
18044  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
18045  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18046  __Pyx_GOTREF(__pyx_t_2);
18047  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18048  } else
18049  #endif
18050  #if CYTHON_FAST_PYCCALL
18051  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
18052  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_8, __pyx_n_s_i};
18053  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
18054  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18055  __Pyx_GOTREF(__pyx_t_2);
18056  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18057  } else
18058  #endif
18059  {
18060  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
18061  __Pyx_GOTREF(__pyx_t_1);
18062  if (__pyx_t_6) {
18063  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
18064  }
18065  __Pyx_GIVEREF(__pyx_t_8);
18066  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_8);
18067  __Pyx_INCREF(__pyx_n_s_i);
18068  __Pyx_GIVEREF(__pyx_n_s_i);
18069  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_n_s_i);
18070  __pyx_t_8 = 0;
18071  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
18072  __Pyx_GOTREF(__pyx_t_2);
18073  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18074  }
18075  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18076  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internalNodesArray, __pyx_t_2) < 0) __PYX_ERR(0, 830, __pyx_L1_error)
18077  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18078 
18079  /* "ADR.pyx":831
18080  * self.nNodes_internal = len(self.internalNodes)
18081  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
18082  * for nI,n in enumerate(self.internalNodes): # <<<<<<<<<<<<<<
18083  * self.internalNodesArray[nI]=n
18084  * #
18085  */
18086  __Pyx_INCREF(__pyx_int_0);
18087  __pyx_t_2 = __pyx_int_0;
18088  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 831, __pyx_L1_error)
18089  __Pyx_GOTREF(__pyx_t_15);
18090  if (likely(PyList_CheckExact(__pyx_t_15)) || PyTuple_CheckExact(__pyx_t_15)) {
18091  __pyx_t_1 = __pyx_t_15; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
18092  __pyx_t_5 = NULL;
18093  } else {
18094  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error)
18095  __Pyx_GOTREF(__pyx_t_1);
18096  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error)
18097  }
18098  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18099  for (;;) {
18100  if (likely(!__pyx_t_5)) {
18101  if (likely(PyList_CheckExact(__pyx_t_1))) {
18102  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
18103  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18104  __pyx_t_15 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_15); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 831, __pyx_L1_error)
18105  #else
18106  __pyx_t_15 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 831, __pyx_L1_error)
18107  __Pyx_GOTREF(__pyx_t_15);
18108  #endif
18109  } else {
18110  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
18111  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18112  __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_15); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 831, __pyx_L1_error)
18113  #else
18114  __pyx_t_15 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 831, __pyx_L1_error)
18115  __Pyx_GOTREF(__pyx_t_15);
18116  #endif
18117  }
18118  } else {
18119  __pyx_t_15 = __pyx_t_5(__pyx_t_1);
18120  if (unlikely(!__pyx_t_15)) {
18121  PyObject* exc_type = PyErr_Occurred();
18122  if (exc_type) {
18123  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
18124  else __PYX_ERR(0, 831, __pyx_L1_error)
18125  }
18126  break;
18127  }
18128  __Pyx_GOTREF(__pyx_t_15);
18129  }
18130  __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_15);
18131  __pyx_t_15 = 0;
18132  __Pyx_INCREF(__pyx_t_2);
18133  __Pyx_XDECREF_SET(__pyx_v_nI, __pyx_t_2);
18134  __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 831, __pyx_L1_error)
18135  __Pyx_GOTREF(__pyx_t_15);
18136  __Pyx_DECREF(__pyx_t_2);
18137  __pyx_t_2 = __pyx_t_15;
18138  __pyx_t_15 = 0;
18139 
18140  /* "ADR.pyx":832
18141  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
18142  * for nI,n in enumerate(self.internalNodes):
18143  * self.internalNodesArray[nI]=n # <<<<<<<<<<<<<<
18144  * #
18145  * del self.internalNodes
18146  */
18147  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_internalNodesArray); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 832, __pyx_L1_error)
18148  __Pyx_GOTREF(__pyx_t_15);
18149  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_v_nI, __pyx_v_n) < 0)) __PYX_ERR(0, 832, __pyx_L1_error)
18150  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18151 
18152  /* "ADR.pyx":831
18153  * self.nNodes_internal = len(self.internalNodes)
18154  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
18155  * for nI,n in enumerate(self.internalNodes): # <<<<<<<<<<<<<<
18156  * self.internalNodesArray[nI]=n
18157  * #
18158  */
18159  }
18160  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18161  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18162 
18163  /* "ADR.pyx":834
18164  * self.internalNodesArray[nI]=n
18165  * #
18166  * del self.internalNodes # <<<<<<<<<<<<<<
18167  * self.internalNodes = None
18168  * log("Updating local to global mappings",2)
18169  */
18170  if (__Pyx_PyObject_DelAttrStr(__pyx_v_self, __pyx_n_s_internalNodes) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
18171 
18172  /* "ADR.pyx":835
18173  * #
18174  * del self.internalNodes
18175  * self.internalNodes = None # <<<<<<<<<<<<<<
18176  * log("Updating local to global mappings",2)
18177  * self.updateLocal2Global()
18178  */
18179  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes, Py_None) < 0) __PYX_ERR(0, 835, __pyx_L1_error)
18180 
18181  /* "ADR.pyx":836
18182  * del self.internalNodes
18183  * self.internalNodes = None
18184  * log("Updating local to global mappings",2) # <<<<<<<<<<<<<<
18185  * self.updateLocal2Global()
18186  * log("Building time integration object",2)
18187  */
18188  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 836, __pyx_L1_error)
18189  __Pyx_GOTREF(__pyx_t_2);
18190  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error)
18191  __Pyx_GOTREF(__pyx_t_1);
18192  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18193  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18194 
18195  /* "ADR.pyx":837
18196  * self.internalNodes = None
18197  * log("Updating local to global mappings",2)
18198  * self.updateLocal2Global() # <<<<<<<<<<<<<<
18199  * log("Building time integration object",2)
18200  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
18201  */
18202  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateLocal2Global); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error)
18203  __Pyx_GOTREF(__pyx_t_2);
18204  __pyx_t_15 = NULL;
18205  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18206  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
18207  if (likely(__pyx_t_15)) {
18208  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18209  __Pyx_INCREF(__pyx_t_15);
18210  __Pyx_INCREF(function);
18211  __Pyx_DECREF_SET(__pyx_t_2, function);
18212  }
18213  }
18214  if (__pyx_t_15) {
18215  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
18216  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18217  } else {
18218  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
18219  }
18220  __Pyx_GOTREF(__pyx_t_1);
18221  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18222  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18223 
18224  /* "ADR.pyx":838
18225  * log("Updating local to global mappings",2)
18226  * self.updateLocal2Global()
18227  * log("Building time integration object",2) # <<<<<<<<<<<<<<
18228  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
18229  * #mwf for interpolating subgrid error for gradients etc
18230  */
18231  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
18232  __Pyx_GOTREF(__pyx_t_1);
18233  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)
18234  __Pyx_GOTREF(__pyx_t_2);
18235  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18236  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18237 
18238  /* "ADR.pyx":839
18239  * self.updateLocal2Global()
18240  * log("Building time integration object",2)
18241  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
18242  * #mwf for interpolating subgrid error for gradients etc
18243  * if self.stabilization and self.stabilization.usesGradientStabilization:
18244  */
18245  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 839, __pyx_L1_error)
18246  __Pyx_GOTREF(__pyx_t_2);
18247  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_memory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L1_error)
18248  __Pyx_GOTREF(__pyx_t_1);
18249  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 839, __pyx_L1_error)
18250  __Pyx_GOTREF(__pyx_t_15);
18251  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18252  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L1_error)
18253  __Pyx_GOTREF(__pyx_t_1);
18254  __Pyx_GIVEREF(__pyx_t_15);
18255  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15);
18256  __pyx_t_15 = 0;
18257  __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 839, __pyx_L1_error)
18258  __Pyx_GOTREF(__pyx_t_15);
18259  if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(0, 839, __pyx_L1_error)
18260  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 839, __pyx_L1_error)
18261  __Pyx_GOTREF(__pyx_t_8);
18262  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18263  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18264  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18265  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18266 
18267  /* "ADR.pyx":841
18268  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
18269  * #mwf for interpolating subgrid error for gradients etc
18270  * if self.stabilization and self.stabilization.usesGradientStabilization: # <<<<<<<<<<<<<<
18271  * self.timeIntegration = TimeIntegrationClass(self,integrateInterpolationPoints=True)
18272  * else:
18273  */
18274  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 841, __pyx_L1_error)
18275  __Pyx_GOTREF(__pyx_t_8);
18276  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 841, __pyx_L1_error)
18277  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18278  if (__pyx_t_9) {
18279  } else {
18280  __pyx_t_3 = __pyx_t_9;
18281  goto __pyx_L103_bool_binop_done;
18282  }
18283  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 841, __pyx_L1_error)
18284  __Pyx_GOTREF(__pyx_t_8);
18285  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_usesGradientStabilization); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 841, __pyx_L1_error)
18286  __Pyx_GOTREF(__pyx_t_15);
18287  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18288  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 841, __pyx_L1_error)
18289  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18290  __pyx_t_3 = __pyx_t_9;
18291  __pyx_L103_bool_binop_done:;
18292  if (__pyx_t_3) {
18293 
18294  /* "ADR.pyx":842
18295  * #mwf for interpolating subgrid error for gradients etc
18296  * if self.stabilization and self.stabilization.usesGradientStabilization:
18297  * self.timeIntegration = TimeIntegrationClass(self,integrateInterpolationPoints=True) # <<<<<<<<<<<<<<
18298  * else:
18299  * self.timeIntegration = TimeIntegrationClass(self)
18300  */
18301  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 842, __pyx_L1_error)
18302  __Pyx_GOTREF(__pyx_t_15);
18303  __Pyx_INCREF(__pyx_v_self);
18304  __Pyx_GIVEREF(__pyx_v_self);
18305  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_self);
18306  __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 842, __pyx_L1_error)
18307  __Pyx_GOTREF(__pyx_t_8);
18308  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_integrateInterpolationPoints, Py_True) < 0) __PYX_ERR(0, 842, __pyx_L1_error)
18309  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_TimeIntegrationClass, __pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
18310  __Pyx_GOTREF(__pyx_t_1);
18311  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18312  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18313  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration, __pyx_t_1) < 0) __PYX_ERR(0, 842, __pyx_L1_error)
18314  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18315 
18316  /* "ADR.pyx":841
18317  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
18318  * #mwf for interpolating subgrid error for gradients etc
18319  * if self.stabilization and self.stabilization.usesGradientStabilization: # <<<<<<<<<<<<<<
18320  * self.timeIntegration = TimeIntegrationClass(self,integrateInterpolationPoints=True)
18321  * else:
18322  */
18323  goto __pyx_L102;
18324  }
18325 
18326  /* "ADR.pyx":844
18327  * self.timeIntegration = TimeIntegrationClass(self,integrateInterpolationPoints=True)
18328  * else:
18329  * self.timeIntegration = TimeIntegrationClass(self) # <<<<<<<<<<<<<<
18330  *
18331  * if options is not None:
18332  */
18333  /*else*/ {
18334  __Pyx_INCREF(__pyx_v_TimeIntegrationClass);
18335  __pyx_t_8 = __pyx_v_TimeIntegrationClass; __pyx_t_15 = NULL;
18336  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
18337  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
18338  if (likely(__pyx_t_15)) {
18339  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
18340  __Pyx_INCREF(__pyx_t_15);
18341  __Pyx_INCREF(function);
18342  __Pyx_DECREF_SET(__pyx_t_8, function);
18343  }
18344  }
18345  if (!__pyx_t_15) {
18346  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
18347  __Pyx_GOTREF(__pyx_t_1);
18348  } else {
18349  #if CYTHON_FAST_PYCALL
18350  if (PyFunction_Check(__pyx_t_8)) {
18351  PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_self};
18352  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
18353  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
18354  __Pyx_GOTREF(__pyx_t_1);
18355  } else
18356  #endif
18357  #if CYTHON_FAST_PYCCALL
18358  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
18359  PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_self};
18360  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
18361  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
18362  __Pyx_GOTREF(__pyx_t_1);
18363  } else
18364  #endif
18365  {
18366  __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)
18367  __Pyx_GOTREF(__pyx_t_2);
18368  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15); __pyx_t_15 = NULL;
18369  __Pyx_INCREF(__pyx_v_self);
18370  __Pyx_GIVEREF(__pyx_v_self);
18371  PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_self);
18372  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
18373  __Pyx_GOTREF(__pyx_t_1);
18374  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18375  }
18376  }
18377  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18378  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration, __pyx_t_1) < 0) __PYX_ERR(0, 844, __pyx_L1_error)
18379  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18380  }
18381  __pyx_L102:;
18382 
18383  /* "ADR.pyx":846
18384  * self.timeIntegration = TimeIntegrationClass(self)
18385  *
18386  * if options is not None: # <<<<<<<<<<<<<<
18387  * self.timeIntegration.setFromOptions(options)
18388  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18389  */
18390  __pyx_t_3 = (__pyx_v_options != Py_None);
18391  __pyx_t_9 = (__pyx_t_3 != 0);
18392  if (__pyx_t_9) {
18393 
18394  /* "ADR.pyx":847
18395  *
18396  * if options is not None:
18397  * self.timeIntegration.setFromOptions(options) # <<<<<<<<<<<<<<
18398  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18399  * log("Calculating numerical quadrature formulas",2)
18400  */
18401  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 847, __pyx_L1_error)
18402  __Pyx_GOTREF(__pyx_t_8);
18403  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_setFromOptions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
18404  __Pyx_GOTREF(__pyx_t_2);
18405  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18406  __pyx_t_8 = NULL;
18407  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18408  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
18409  if (likely(__pyx_t_8)) {
18410  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18411  __Pyx_INCREF(__pyx_t_8);
18412  __Pyx_INCREF(function);
18413  __Pyx_DECREF_SET(__pyx_t_2, function);
18414  }
18415  }
18416  if (!__pyx_t_8) {
18417  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
18418  __Pyx_GOTREF(__pyx_t_1);
18419  } else {
18420  #if CYTHON_FAST_PYCALL
18421  if (PyFunction_Check(__pyx_t_2)) {
18422  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_options};
18423  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
18424  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
18425  __Pyx_GOTREF(__pyx_t_1);
18426  } else
18427  #endif
18428  #if CYTHON_FAST_PYCCALL
18429  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
18430  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_options};
18431  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
18432  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
18433  __Pyx_GOTREF(__pyx_t_1);
18434  } else
18435  #endif
18436  {
18437  __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 847, __pyx_L1_error)
18438  __Pyx_GOTREF(__pyx_t_15);
18439  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL;
18440  __Pyx_INCREF(__pyx_v_options);
18441  __Pyx_GIVEREF(__pyx_v_options);
18442  PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_options);
18443  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
18444  __Pyx_GOTREF(__pyx_t_1);
18445  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18446  }
18447  }
18448  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18449  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18450 
18451  /* "ADR.pyx":846
18452  * self.timeIntegration = TimeIntegrationClass(self)
18453  *
18454  * if options is not None: # <<<<<<<<<<<<<<
18455  * self.timeIntegration.setFromOptions(options)
18456  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18457  */
18458  }
18459 
18460  /* "ADR.pyx":848
18461  * if options is not None:
18462  * self.timeIntegration.setFromOptions(options)
18463  * log(memory("TimeIntegration","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
18464  * log("Calculating numerical quadrature formulas",2)
18465  * self.calculateQuadrature()
18466  */
18467  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
18468  __Pyx_GOTREF(__pyx_t_1);
18469  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_memory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
18470  __Pyx_GOTREF(__pyx_t_2);
18471  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 848, __pyx_L1_error)
18472  __Pyx_GOTREF(__pyx_t_15);
18473  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18474  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
18475  __Pyx_GOTREF(__pyx_t_2);
18476  __Pyx_GIVEREF(__pyx_t_15);
18477  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15);
18478  __pyx_t_15 = 0;
18479  __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 848, __pyx_L1_error)
18480  __Pyx_GOTREF(__pyx_t_15);
18481  if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(0, 848, __pyx_L1_error)
18482  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 848, __pyx_L1_error)
18483  __Pyx_GOTREF(__pyx_t_8);
18484  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18485  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18486  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18487  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18488 
18489  /* "ADR.pyx":849
18490  * self.timeIntegration.setFromOptions(options)
18491  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18492  * log("Calculating numerical quadrature formulas",2) # <<<<<<<<<<<<<<
18493  * self.calculateQuadrature()
18494  *
18495  */
18496  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 849, __pyx_L1_error)
18497  __Pyx_GOTREF(__pyx_t_8);
18498  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 849, __pyx_L1_error)
18499  __Pyx_GOTREF(__pyx_t_15);
18500  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18501  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18502 
18503  /* "ADR.pyx":850
18504  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18505  * log("Calculating numerical quadrature formulas",2)
18506  * self.calculateQuadrature() # <<<<<<<<<<<<<<
18507  *
18508  * comm = Comm.get()
18509  */
18510  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calculateQuadrature); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 850, __pyx_L1_error)
18511  __Pyx_GOTREF(__pyx_t_8);
18512  __pyx_t_2 = NULL;
18513  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
18514  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
18515  if (likely(__pyx_t_2)) {
18516  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
18517  __Pyx_INCREF(__pyx_t_2);
18518  __Pyx_INCREF(function);
18519  __Pyx_DECREF_SET(__pyx_t_8, function);
18520  }
18521  }
18522  if (__pyx_t_2) {
18523  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 850, __pyx_L1_error)
18524  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18525  } else {
18526  __pyx_t_15 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 850, __pyx_L1_error)
18527  }
18528  __Pyx_GOTREF(__pyx_t_15);
18529  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18530  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18531 
18532  /* "ADR.pyx":852
18533  * self.calculateQuadrature()
18534  *
18535  * comm = Comm.get() # <<<<<<<<<<<<<<
18536  * self.comm=comm
18537  * if comm.size() > 1:
18538  */
18539  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_Comm, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 852, __pyx_L1_error)
18540  __Pyx_GOTREF(__pyx_t_8);
18541  __pyx_t_2 = NULL;
18542  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
18543  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
18544  if (likely(__pyx_t_2)) {
18545  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
18546  __Pyx_INCREF(__pyx_t_2);
18547  __Pyx_INCREF(function);
18548  __Pyx_DECREF_SET(__pyx_t_8, function);
18549  }
18550  }
18551  if (__pyx_t_2) {
18552  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 852, __pyx_L1_error)
18553  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18554  } else {
18555  __pyx_t_15 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 852, __pyx_L1_error)
18556  }
18557  __Pyx_GOTREF(__pyx_t_15);
18558  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18559  __pyx_v_comm = __pyx_t_15;
18560  __pyx_t_15 = 0;
18561 
18562  /* "ADR.pyx":853
18563  *
18564  * comm = Comm.get()
18565  * self.comm=comm # <<<<<<<<<<<<<<
18566  * if comm.size() > 1:
18567  * assert numericalFluxType is not None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs"
18568  */
18569  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_comm, __pyx_v_comm) < 0) __PYX_ERR(0, 853, __pyx_L1_error)
18570 
18571  /* "ADR.pyx":854
18572  * comm = Comm.get()
18573  * self.comm=comm
18574  * if comm.size() > 1: # <<<<<<<<<<<<<<
18575  * assert numericalFluxType is not None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs"
18576  *
18577  */
18578  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 854, __pyx_L1_error)
18579  __Pyx_GOTREF(__pyx_t_8);
18580  __pyx_t_2 = NULL;
18581  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
18582  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
18583  if (likely(__pyx_t_2)) {
18584  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
18585  __Pyx_INCREF(__pyx_t_2);
18586  __Pyx_INCREF(function);
18587  __Pyx_DECREF_SET(__pyx_t_8, function);
18588  }
18589  }
18590  if (__pyx_t_2) {
18591  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 854, __pyx_L1_error)
18592  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18593  } else {
18594  __pyx_t_15 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 854, __pyx_L1_error)
18595  }
18596  __Pyx_GOTREF(__pyx_t_15);
18597  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18598  __pyx_t_8 = PyObject_RichCompare(__pyx_t_15, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 854, __pyx_L1_error)
18599  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18600  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 854, __pyx_L1_error)
18601  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18602  if (__pyx_t_9) {
18603 
18604  /* "ADR.pyx":855
18605  * self.comm=comm
18606  * if comm.size() > 1:
18607  * assert numericalFluxType is not None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs" # <<<<<<<<<<<<<<
18608  *
18609  * self.setupFieldStrides()
18610  */
18611  #ifndef CYTHON_WITHOUT_ASSERTIONS
18612  if (unlikely(!Py_OptimizeFlag)) {
18613  __pyx_t_3 = (__pyx_v_numericalFluxType != Py_None);
18614  __pyx_t_17 = (__pyx_t_3 != 0);
18615  if (__pyx_t_17) {
18616  } else {
18617  __pyx_t_9 = __pyx_t_17;
18618  goto __pyx_L107_bool_binop_done;
18619  }
18620  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_numericalFluxType, __pyx_n_s_useWeakDirichletConditions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 855, __pyx_L1_error)
18621  __Pyx_GOTREF(__pyx_t_8);
18622  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 855, __pyx_L1_error)
18623  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18624  __pyx_t_9 = __pyx_t_17;
18625  __pyx_L107_bool_binop_done:;
18626  if (unlikely(!__pyx_t_9)) {
18627  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_You_must_use_a_numerical_flux_to);
18628  __PYX_ERR(0, 855, __pyx_L1_error)
18629  }
18630  }
18631  #endif
18632 
18633  /* "ADR.pyx":854
18634  * comm = Comm.get()
18635  * self.comm=comm
18636  * if comm.size() > 1: # <<<<<<<<<<<<<<
18637  * assert numericalFluxType is not None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs"
18638  *
18639  */
18640  }
18641 
18642  /* "ADR.pyx":857
18643  * assert numericalFluxType is not None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs"
18644  *
18645  * self.setupFieldStrides() # <<<<<<<<<<<<<<
18646  *
18647  * log(memory("stride+offset","OneLevelTransport"),level=4)
18648  */
18649  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_setupFieldStrides); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 857, __pyx_L1_error)
18650  __Pyx_GOTREF(__pyx_t_15);
18651  __pyx_t_2 = NULL;
18652  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
18653  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_15);
18654  if (likely(__pyx_t_2)) {
18655  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
18656  __Pyx_INCREF(__pyx_t_2);
18657  __Pyx_INCREF(function);
18658  __Pyx_DECREF_SET(__pyx_t_15, function);
18659  }
18660  }
18661  if (__pyx_t_2) {
18662  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 857, __pyx_L1_error)
18663  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18664  } else {
18665  __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 857, __pyx_L1_error)
18666  }
18667  __Pyx_GOTREF(__pyx_t_8);
18668  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18669  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18670 
18671  /* "ADR.pyx":859
18672  * self.setupFieldStrides()
18673  *
18674  * log(memory("stride+offset","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
18675  * if numericalFluxType is not None:
18676  * if options is None or options.periodicDirichletConditions is None:
18677  */
18678  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 859, __pyx_L1_error)
18679  __Pyx_GOTREF(__pyx_t_8);
18680  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_memory); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 859, __pyx_L1_error)
18681  __Pyx_GOTREF(__pyx_t_15);
18682  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error)
18683  __Pyx_GOTREF(__pyx_t_2);
18684  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18685  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 859, __pyx_L1_error)
18686  __Pyx_GOTREF(__pyx_t_15);
18687  __Pyx_GIVEREF(__pyx_t_2);
18688  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_2);
18689  __pyx_t_2 = 0;
18690  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error)
18691  __Pyx_GOTREF(__pyx_t_2);
18692  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(0, 859, __pyx_L1_error)
18693  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_15, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
18694  __Pyx_GOTREF(__pyx_t_1);
18695  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18696  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18697  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18698  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18699 
18700  /* "ADR.pyx":860
18701  *
18702  * log(memory("stride+offset","OneLevelTransport"),level=4)
18703  * if numericalFluxType is not None: # <<<<<<<<<<<<<<
18704  * if options is None or options.periodicDirichletConditions is None:
18705  * self.numericalFlux = numericalFluxType(self,
18706  */
18707  __pyx_t_9 = (__pyx_v_numericalFluxType != Py_None);
18708  __pyx_t_17 = (__pyx_t_9 != 0);
18709  if (__pyx_t_17) {
18710 
18711  /* "ADR.pyx":861
18712  * log(memory("stride+offset","OneLevelTransport"),level=4)
18713  * if numericalFluxType is not None:
18714  * if options is None or options.periodicDirichletConditions is None: # <<<<<<<<<<<<<<
18715  * self.numericalFlux = numericalFluxType(self,
18716  * dofBoundaryConditionsSetterDict,
18717  */
18718  __pyx_t_9 = (__pyx_v_options == Py_None);
18719  __pyx_t_3 = (__pyx_t_9 != 0);
18720  if (!__pyx_t_3) {
18721  } else {
18722  __pyx_t_17 = __pyx_t_3;
18723  goto __pyx_L111_bool_binop_done;
18724  }
18725  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_periodicDirichletConditions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 861, __pyx_L1_error)
18726  __Pyx_GOTREF(__pyx_t_1);
18727  __pyx_t_3 = (__pyx_t_1 == Py_None);
18728  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18729  __pyx_t_9 = (__pyx_t_3 != 0);
18730  __pyx_t_17 = __pyx_t_9;
18731  __pyx_L111_bool_binop_done:;
18732  if (__pyx_t_17) {
18733 
18734  /* "ADR.pyx":865
18735  * dofBoundaryConditionsSetterDict,
18736  * advectiveFluxBoundaryConditionsSetterDict,
18737  * diffusiveFluxBoundaryConditionsSetterDictDict) # <<<<<<<<<<<<<<
18738  * else:
18739  * self.numericalFlux = numericalFluxType(self,
18740  */
18741  __Pyx_INCREF(__pyx_v_numericalFluxType);
18742  __pyx_t_2 = __pyx_v_numericalFluxType; __pyx_t_15 = NULL;
18743  __pyx_t_14 = 0;
18744  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
18745  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
18746  if (likely(__pyx_t_15)) {
18747  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18748  __Pyx_INCREF(__pyx_t_15);
18749  __Pyx_INCREF(function);
18750  __Pyx_DECREF_SET(__pyx_t_2, function);
18751  __pyx_t_14 = 1;
18752  }
18753  }
18754  #if CYTHON_FAST_PYCALL
18755  if (PyFunction_Check(__pyx_t_2)) {
18756  PyObject *__pyx_temp[5] = {__pyx_t_15, __pyx_v_self, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict};
18757  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 4+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 862, __pyx_L1_error)
18758  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
18759  __Pyx_GOTREF(__pyx_t_1);
18760  } else
18761  #endif
18762  #if CYTHON_FAST_PYCCALL
18763  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
18764  PyObject *__pyx_temp[5] = {__pyx_t_15, __pyx_v_self, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict};
18765  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 4+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 862, __pyx_L1_error)
18766  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
18767  __Pyx_GOTREF(__pyx_t_1);
18768  } else
18769  #endif
18770  {
18771  __pyx_t_8 = PyTuple_New(4+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 862, __pyx_L1_error)
18772  __Pyx_GOTREF(__pyx_t_8);
18773  if (__pyx_t_15) {
18774  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_15); __pyx_t_15 = NULL;
18775  }
18776  __Pyx_INCREF(__pyx_v_self);
18777  __Pyx_GIVEREF(__pyx_v_self);
18778  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_14, __pyx_v_self);
18779  __Pyx_INCREF(__pyx_v_dofBoundaryConditionsSetterDict);
18780  __Pyx_GIVEREF(__pyx_v_dofBoundaryConditionsSetterDict);
18781  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_14, __pyx_v_dofBoundaryConditionsSetterDict);
18782  __Pyx_INCREF(__pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18783  __Pyx_GIVEREF(__pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18784  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_14, __pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18785  __Pyx_INCREF(__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18786  __Pyx_GIVEREF(__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18787  PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_14, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18788  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 862, __pyx_L1_error)
18789  __Pyx_GOTREF(__pyx_t_1);
18790  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18791  }
18792  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18793 
18794  /* "ADR.pyx":862
18795  * if numericalFluxType is not None:
18796  * if options is None or options.periodicDirichletConditions is None:
18797  * self.numericalFlux = numericalFluxType(self, # <<<<<<<<<<<<<<
18798  * dofBoundaryConditionsSetterDict,
18799  * advectiveFluxBoundaryConditionsSetterDict,
18800  */
18801  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux, __pyx_t_1) < 0) __PYX_ERR(0, 862, __pyx_L1_error)
18802  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18803 
18804  /* "ADR.pyx":861
18805  * log(memory("stride+offset","OneLevelTransport"),level=4)
18806  * if numericalFluxType is not None:
18807  * if options is None or options.periodicDirichletConditions is None: # <<<<<<<<<<<<<<
18808  * self.numericalFlux = numericalFluxType(self,
18809  * dofBoundaryConditionsSetterDict,
18810  */
18811  goto __pyx_L110;
18812  }
18813 
18814  /* "ADR.pyx":867
18815  * diffusiveFluxBoundaryConditionsSetterDictDict)
18816  * else:
18817  * self.numericalFlux = numericalFluxType(self, # <<<<<<<<<<<<<<
18818  * dofBoundaryConditionsSetterDict,
18819  * advectiveFluxBoundaryConditionsSetterDict,
18820  */
18821  /*else*/ {
18822 
18823  /* "ADR.pyx":871
18824  * advectiveFluxBoundaryConditionsSetterDict,
18825  * diffusiveFluxBoundaryConditionsSetterDictDict,
18826  * options.periodicDirichletConditions) # <<<<<<<<<<<<<<
18827  * else:
18828  * self.numericalFlux = None
18829  */
18830  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_periodicDirichletConditions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error)
18831  __Pyx_GOTREF(__pyx_t_2);
18832  __Pyx_INCREF(__pyx_v_numericalFluxType);
18833  __pyx_t_8 = __pyx_v_numericalFluxType; __pyx_t_15 = NULL;
18834  __pyx_t_14 = 0;
18835  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
18836  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
18837  if (likely(__pyx_t_15)) {
18838  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
18839  __Pyx_INCREF(__pyx_t_15);
18840  __Pyx_INCREF(function);
18841  __Pyx_DECREF_SET(__pyx_t_8, function);
18842  __pyx_t_14 = 1;
18843  }
18844  }
18845  #if CYTHON_FAST_PYCALL
18846  if (PyFunction_Check(__pyx_t_8)) {
18847  PyObject *__pyx_temp[6] = {__pyx_t_15, __pyx_v_self, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, __pyx_t_2};
18848  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 5+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
18849  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
18850  __Pyx_GOTREF(__pyx_t_1);
18851  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18852  } else
18853  #endif
18854  #if CYTHON_FAST_PYCCALL
18855  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
18856  PyObject *__pyx_temp[6] = {__pyx_t_15, __pyx_v_self, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, __pyx_t_2};
18857  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 5+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
18858  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
18859  __Pyx_GOTREF(__pyx_t_1);
18860  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18861  } else
18862  #endif
18863  {
18864  __pyx_t_6 = PyTuple_New(5+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error)
18865  __Pyx_GOTREF(__pyx_t_6);
18866  if (__pyx_t_15) {
18867  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15); __pyx_t_15 = NULL;
18868  }
18869  __Pyx_INCREF(__pyx_v_self);
18870  __Pyx_GIVEREF(__pyx_v_self);
18871  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_14, __pyx_v_self);
18872  __Pyx_INCREF(__pyx_v_dofBoundaryConditionsSetterDict);
18873  __Pyx_GIVEREF(__pyx_v_dofBoundaryConditionsSetterDict);
18874  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_14, __pyx_v_dofBoundaryConditionsSetterDict);
18875  __Pyx_INCREF(__pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18876  __Pyx_GIVEREF(__pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18877  PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_14, __pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18878  __Pyx_INCREF(__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18879  __Pyx_GIVEREF(__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18880  PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_14, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18881  __Pyx_GIVEREF(__pyx_t_2);
18882  PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_14, __pyx_t_2);
18883  __pyx_t_2 = 0;
18884  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
18885  __Pyx_GOTREF(__pyx_t_1);
18886  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18887  }
18888  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18889 
18890  /* "ADR.pyx":867
18891  * diffusiveFluxBoundaryConditionsSetterDictDict)
18892  * else:
18893  * self.numericalFlux = numericalFluxType(self, # <<<<<<<<<<<<<<
18894  * dofBoundaryConditionsSetterDict,
18895  * advectiveFluxBoundaryConditionsSetterDict,
18896  */
18897  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux, __pyx_t_1) < 0) __PYX_ERR(0, 867, __pyx_L1_error)
18898  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18899  }
18900  __pyx_L110:;
18901 
18902  /* "ADR.pyx":860
18903  *
18904  * log(memory("stride+offset","OneLevelTransport"),level=4)
18905  * if numericalFluxType is not None: # <<<<<<<<<<<<<<
18906  * if options is None or options.periodicDirichletConditions is None:
18907  * self.numericalFlux = numericalFluxType(self,
18908  */
18909  goto __pyx_L109;
18910  }
18911 
18912  /* "ADR.pyx":873
18913  * options.periodicDirichletConditions)
18914  * else:
18915  * self.numericalFlux = None # <<<<<<<<<<<<<<
18916  * #set penalty terms
18917  * #cek todo move into numerical flux initialization
18918  */
18919  /*else*/ {
18920  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux, Py_None) < 0) __PYX_ERR(0, 873, __pyx_L1_error)
18921  }
18922  __pyx_L109:;
18923 
18924  /* "ADR.pyx":876
18925  * #set penalty terms
18926  * #cek todo move into numerical flux initialization
18927  * if self.ebq_global.has_key('penalty'): # <<<<<<<<<<<<<<
18928  * for ebN in range(self.mesh.nElementBoundaries_global):
18929  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
18930  */
18931  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebq_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)
18932  __Pyx_GOTREF(__pyx_t_1);
18933  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_has_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 876, __pyx_L1_error)
18934  __Pyx_GOTREF(__pyx_t_8);
18935  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18936  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)
18937  __Pyx_GOTREF(__pyx_t_1);
18938  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18939  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 876, __pyx_L1_error)
18940  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18941  if (__pyx_t_17) {
18942 
18943  /* "ADR.pyx":877
18944  * #cek todo move into numerical flux initialization
18945  * if self.ebq_global.has_key('penalty'):
18946  * for ebN in range(self.mesh.nElementBoundaries_global): # <<<<<<<<<<<<<<
18947  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
18948  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)
18949  */
18950  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
18951  __Pyx_GOTREF(__pyx_t_1);
18952  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nElementBoundaries_global); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 877, __pyx_L1_error)
18953  __Pyx_GOTREF(__pyx_t_8);
18954  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18955  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
18956  __Pyx_GOTREF(__pyx_t_1);
18957  __Pyx_GIVEREF(__pyx_t_8);
18958  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
18959  __pyx_t_8 = 0;
18960  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 877, __pyx_L1_error)
18961  __Pyx_GOTREF(__pyx_t_8);
18962  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18963  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
18964  __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
18965  __pyx_t_5 = NULL;
18966  } else {
18967  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
18968  __Pyx_GOTREF(__pyx_t_1);
18969  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 877, __pyx_L1_error)
18970  }
18971  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18972  for (;;) {
18973  if (likely(!__pyx_t_5)) {
18974  if (likely(PyList_CheckExact(__pyx_t_1))) {
18975  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
18976  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18977  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 877, __pyx_L1_error)
18978  #else
18979  __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 877, __pyx_L1_error)
18980  __Pyx_GOTREF(__pyx_t_8);
18981  #endif
18982  } else {
18983  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
18984  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18985  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 877, __pyx_L1_error)
18986  #else
18987  __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 877, __pyx_L1_error)
18988  __Pyx_GOTREF(__pyx_t_8);
18989  #endif
18990  }
18991  } else {
18992  __pyx_t_8 = __pyx_t_5(__pyx_t_1);
18993  if (unlikely(!__pyx_t_8)) {
18994  PyObject* exc_type = PyErr_Occurred();
18995  if (exc_type) {
18996  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
18997  else __PYX_ERR(0, 877, __pyx_L1_error)
18998  }
18999  break;
19000  }
19001  __Pyx_GOTREF(__pyx_t_8);
19002  }
19003  __Pyx_XDECREF_SET(__pyx_v_ebN, __pyx_t_8);
19004  __pyx_t_8 = 0;
19005 
19006  /* "ADR.pyx":878
19007  * if self.ebq_global.has_key('penalty'):
19008  * for ebN in range(self.mesh.nElementBoundaries_global):
19009  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): # <<<<<<<<<<<<<<
19010  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)
19011  * #penalty term
19012  */
19013  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 878, __pyx_L1_error)
19014  __Pyx_GOTREF(__pyx_t_8);
19015  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 878, __pyx_L1_error)
19016  __Pyx_GOTREF(__pyx_t_6);
19017  __Pyx_GIVEREF(__pyx_t_8);
19018  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
19019  __pyx_t_8 = 0;
19020  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 878, __pyx_L1_error)
19021  __Pyx_GOTREF(__pyx_t_8);
19022  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19023  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
19024  __pyx_t_6 = __pyx_t_8; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0;
19025  __pyx_t_11 = NULL;
19026  } else {
19027  __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 878, __pyx_L1_error)
19028  __Pyx_GOTREF(__pyx_t_6);
19029  __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 878, __pyx_L1_error)
19030  }
19031  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19032  for (;;) {
19033  if (likely(!__pyx_t_11)) {
19034  if (likely(PyList_CheckExact(__pyx_t_6))) {
19035  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
19036  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19037  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 878, __pyx_L1_error)
19038  #else
19039  __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 878, __pyx_L1_error)
19040  __Pyx_GOTREF(__pyx_t_8);
19041  #endif
19042  } else {
19043  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
19044  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19045  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 878, __pyx_L1_error)
19046  #else
19047  __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 878, __pyx_L1_error)
19048  __Pyx_GOTREF(__pyx_t_8);
19049  #endif
19050  }
19051  } else {
19052  __pyx_t_8 = __pyx_t_11(__pyx_t_6);
19053  if (unlikely(!__pyx_t_8)) {
19054  PyObject* exc_type = PyErr_Occurred();
19055  if (exc_type) {
19056  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
19057  else __PYX_ERR(0, 878, __pyx_L1_error)
19058  }
19059  break;
19060  }
19061  __Pyx_GOTREF(__pyx_t_8);
19062  }
19063  __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_8);
19064  __pyx_t_8 = 0;
19065 
19066  /* "ADR.pyx":879
19067  * for ebN in range(self.mesh.nElementBoundaries_global):
19068  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19069  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power) # <<<<<<<<<<<<<<
19070  * #penalty term
19071  * #cek move to Numerical flux initialization
19072  */
19073  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 879, __pyx_L1_error)
19074  __Pyx_GOTREF(__pyx_t_8);
19075  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_penalty_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error)
19076  __Pyx_GOTREF(__pyx_t_2);
19077  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19078  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 879, __pyx_L1_error)
19079  __Pyx_GOTREF(__pyx_t_8);
19080  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_elementBoundaryDiametersArray); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 879, __pyx_L1_error)
19081  __Pyx_GOTREF(__pyx_t_15);
19082  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19083  __pyx_t_8 = PyObject_GetItem(__pyx_t_15, __pyx_v_ebN); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 879, __pyx_L1_error)
19084  __Pyx_GOTREF(__pyx_t_8);
19085  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19086  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 879, __pyx_L1_error)
19087  __Pyx_GOTREF(__pyx_t_15);
19088  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_penalty_power); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 879, __pyx_L1_error)
19089  __Pyx_GOTREF(__pyx_t_7);
19090  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19091  __pyx_t_15 = PyNumber_Power(__pyx_t_8, __pyx_t_7, Py_None); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 879, __pyx_L1_error)
19092  __Pyx_GOTREF(__pyx_t_15);
19093  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19094  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19095  __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 879, __pyx_L1_error)
19096  __Pyx_GOTREF(__pyx_t_7);
19097  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19098  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19099  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebq_global); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 879, __pyx_L1_error)
19100  __Pyx_GOTREF(__pyx_t_15);
19101  __pyx_t_2 = PyObject_GetItem(__pyx_t_15, __pyx_n_s_penalty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error)
19102  __Pyx_GOTREF(__pyx_t_2);
19103  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19104  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 879, __pyx_L1_error)
19105  __Pyx_GOTREF(__pyx_t_15);
19106  __Pyx_INCREF(__pyx_v_ebN);
19107  __Pyx_GIVEREF(__pyx_v_ebN);
19108  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_ebN);
19109  __Pyx_INCREF(__pyx_v_k);
19110  __Pyx_GIVEREF(__pyx_v_k);
19111  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_v_k);
19112  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_15, __pyx_t_7) < 0)) __PYX_ERR(0, 879, __pyx_L1_error)
19113  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19114  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19115  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19116 
19117  /* "ADR.pyx":878
19118  * if self.ebq_global.has_key('penalty'):
19119  * for ebN in range(self.mesh.nElementBoundaries_global):
19120  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): # <<<<<<<<<<<<<<
19121  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)
19122  * #penalty term
19123  */
19124  }
19125  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19126 
19127  /* "ADR.pyx":877
19128  * #cek todo move into numerical flux initialization
19129  * if self.ebq_global.has_key('penalty'):
19130  * for ebN in range(self.mesh.nElementBoundaries_global): # <<<<<<<<<<<<<<
19131  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19132  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)
19133  */
19134  }
19135  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19136 
19137  /* "ADR.pyx":876
19138  * #set penalty terms
19139  * #cek todo move into numerical flux initialization
19140  * if self.ebq_global.has_key('penalty'): # <<<<<<<<<<<<<<
19141  * for ebN in range(self.mesh.nElementBoundaries_global):
19142  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19143  */
19144  }
19145 
19146  /* "ADR.pyx":882
19147  * #penalty term
19148  * #cek move to Numerical flux initialization
19149  * if self.ebqe.has_key('penalty'): # <<<<<<<<<<<<<<
19150  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
19151  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19152  */
19153  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)
19154  __Pyx_GOTREF(__pyx_t_1);
19155  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_has_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 882, __pyx_L1_error)
19156  __Pyx_GOTREF(__pyx_t_6);
19157  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19158  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)
19159  __Pyx_GOTREF(__pyx_t_1);
19160  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19161  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 882, __pyx_L1_error)
19162  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19163  if (__pyx_t_17) {
19164 
19165  /* "ADR.pyx":883
19166  * #cek move to Numerical flux initialization
19167  * if self.ebqe.has_key('penalty'):
19168  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global): # <<<<<<<<<<<<<<
19169  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19170  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19171  */
19172  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
19173  __Pyx_GOTREF(__pyx_t_1);
19174  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 883, __pyx_L1_error)
19175  __Pyx_GOTREF(__pyx_t_6);
19176  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19177  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
19178  __Pyx_GOTREF(__pyx_t_1);
19179  __Pyx_GIVEREF(__pyx_t_6);
19180  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
19181  __pyx_t_6 = 0;
19182  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 883, __pyx_L1_error)
19183  __Pyx_GOTREF(__pyx_t_6);
19184  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19185  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
19186  __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
19187  __pyx_t_5 = NULL;
19188  } else {
19189  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
19190  __Pyx_GOTREF(__pyx_t_1);
19191  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 883, __pyx_L1_error)
19192  }
19193  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19194  for (;;) {
19195  if (likely(!__pyx_t_5)) {
19196  if (likely(PyList_CheckExact(__pyx_t_1))) {
19197  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
19198  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19199  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 883, __pyx_L1_error)
19200  #else
19201  __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 883, __pyx_L1_error)
19202  __Pyx_GOTREF(__pyx_t_6);
19203  #endif
19204  } else {
19205  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
19206  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19207  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 883, __pyx_L1_error)
19208  #else
19209  __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 883, __pyx_L1_error)
19210  __Pyx_GOTREF(__pyx_t_6);
19211  #endif
19212  }
19213  } else {
19214  __pyx_t_6 = __pyx_t_5(__pyx_t_1);
19215  if (unlikely(!__pyx_t_6)) {
19216  PyObject* exc_type = PyErr_Occurred();
19217  if (exc_type) {
19218  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
19219  else __PYX_ERR(0, 883, __pyx_L1_error)
19220  }
19221  break;
19222  }
19223  __Pyx_GOTREF(__pyx_t_6);
19224  }
19225  __Pyx_XDECREF_SET(__pyx_v_ebNE, __pyx_t_6);
19226  __pyx_t_6 = 0;
19227 
19228  /* "ADR.pyx":884
19229  * if self.ebqe.has_key('penalty'):
19230  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
19231  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE] # <<<<<<<<<<<<<<
19232  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19233  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19234  */
19235  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 884, __pyx_L1_error)
19236  __Pyx_GOTREF(__pyx_t_6);
19237  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 884, __pyx_L1_error)
19238  __Pyx_GOTREF(__pyx_t_7);
19239  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19240  __pyx_t_6 = PyObject_GetItem(__pyx_t_7, __pyx_v_ebNE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 884, __pyx_L1_error)
19241  __Pyx_GOTREF(__pyx_t_6);
19242  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19243  __Pyx_XDECREF_SET(__pyx_v_ebN, __pyx_t_6);
19244  __pyx_t_6 = 0;
19245 
19246  /* "ADR.pyx":885
19247  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
19248  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19249  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): # <<<<<<<<<<<<<<
19250  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19251  * log(memory("numericalFlux","OneLevelTransport"),level=4)
19252  */
19253  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error)
19254  __Pyx_GOTREF(__pyx_t_6);
19255  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 885, __pyx_L1_error)
19256  __Pyx_GOTREF(__pyx_t_7);
19257  __Pyx_GIVEREF(__pyx_t_6);
19258  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
19259  __pyx_t_6 = 0;
19260  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error)
19261  __Pyx_GOTREF(__pyx_t_6);
19262  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19263  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
19264  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0;
19265  __pyx_t_11 = NULL;
19266  } else {
19267  __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 885, __pyx_L1_error)
19268  __Pyx_GOTREF(__pyx_t_7);
19269  __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 885, __pyx_L1_error)
19270  }
19271  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19272  for (;;) {
19273  if (likely(!__pyx_t_11)) {
19274  if (likely(PyList_CheckExact(__pyx_t_7))) {
19275  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break;
19276  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19277  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 885, __pyx_L1_error)
19278  #else
19279  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error)
19280  __Pyx_GOTREF(__pyx_t_6);
19281  #endif
19282  } else {
19283  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
19284  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19285  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 885, __pyx_L1_error)
19286  #else
19287  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error)
19288  __Pyx_GOTREF(__pyx_t_6);
19289  #endif
19290  }
19291  } else {
19292  __pyx_t_6 = __pyx_t_11(__pyx_t_7);
19293  if (unlikely(!__pyx_t_6)) {
19294  PyObject* exc_type = PyErr_Occurred();
19295  if (exc_type) {
19296  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
19297  else __PYX_ERR(0, 885, __pyx_L1_error)
19298  }
19299  break;
19300  }
19301  __Pyx_GOTREF(__pyx_t_6);
19302  }
19303  __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
19304  __pyx_t_6 = 0;
19305 
19306  /* "ADR.pyx":886
19307  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19308  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19309  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power # <<<<<<<<<<<<<<
19310  * log(memory("numericalFlux","OneLevelTransport"),level=4)
19311  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray
19312  */
19313  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 886, __pyx_L1_error)
19314  __Pyx_GOTREF(__pyx_t_6);
19315  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_penalty_constant); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 886, __pyx_L1_error)
19316  __Pyx_GOTREF(__pyx_t_15);
19317  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19318  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 886, __pyx_L1_error)
19319  __Pyx_GOTREF(__pyx_t_6);
19320  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_elementBoundaryDiametersArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)
19321  __Pyx_GOTREF(__pyx_t_2);
19322  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19323  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_v_ebN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 886, __pyx_L1_error)
19324  __Pyx_GOTREF(__pyx_t_6);
19325  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19326  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)
19327  __Pyx_GOTREF(__pyx_t_2);
19328  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_penalty_power); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error)
19329  __Pyx_GOTREF(__pyx_t_8);
19330  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19331  __pyx_t_2 = PyNumber_Power(__pyx_t_6, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)
19332  __Pyx_GOTREF(__pyx_t_2);
19333  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19334  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19335  __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_15, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error)
19336  __Pyx_GOTREF(__pyx_t_8);
19337  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19338  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19339  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)
19340  __Pyx_GOTREF(__pyx_t_2);
19341  __pyx_t_15 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_penalty); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 886, __pyx_L1_error)
19342  __Pyx_GOTREF(__pyx_t_15);
19343  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19344  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)
19345  __Pyx_GOTREF(__pyx_t_2);
19346  __Pyx_INCREF(__pyx_v_ebNE);
19347  __Pyx_GIVEREF(__pyx_v_ebNE);
19348  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ebNE);
19349  __Pyx_INCREF(__pyx_v_k);
19350  __Pyx_GIVEREF(__pyx_v_k);
19351  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_k);
19352  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_t_2, __pyx_t_8) < 0)) __PYX_ERR(0, 886, __pyx_L1_error)
19353  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19354  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19355  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19356 
19357  /* "ADR.pyx":885
19358  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
19359  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19360  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): # <<<<<<<<<<<<<<
19361  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19362  * log(memory("numericalFlux","OneLevelTransport"),level=4)
19363  */
19364  }
19365  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19366 
19367  /* "ADR.pyx":883
19368  * #cek move to Numerical flux initialization
19369  * if self.ebqe.has_key('penalty'):
19370  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global): # <<<<<<<<<<<<<<
19371  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19372  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19373  */
19374  }
19375  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19376 
19377  /* "ADR.pyx":882
19378  * #penalty term
19379  * #cek move to Numerical flux initialization
19380  * if self.ebqe.has_key('penalty'): # <<<<<<<<<<<<<<
19381  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
19382  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19383  */
19384  }
19385 
19386  /* "ADR.pyx":887
19387  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19388  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19389  * log(memory("numericalFlux","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
19390  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray
19391  * #use post processing tools to get conservative fluxes, None by default
19392  */
19393  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
19394  __Pyx_GOTREF(__pyx_t_1);
19395  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_memory); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 887, __pyx_L1_error)
19396  __Pyx_GOTREF(__pyx_t_7);
19397  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L1_error)
19398  __Pyx_GOTREF(__pyx_t_8);
19399  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19400  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 887, __pyx_L1_error)
19401  __Pyx_GOTREF(__pyx_t_7);
19402  __Pyx_GIVEREF(__pyx_t_8);
19403  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
19404  __pyx_t_8 = 0;
19405  __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L1_error)
19406  __Pyx_GOTREF(__pyx_t_8);
19407  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(0, 887, __pyx_L1_error)
19408  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error)
19409  __Pyx_GOTREF(__pyx_t_2);
19410  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19411  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19412  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19413  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19414 
19415  /* "ADR.pyx":888
19416  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19417  * log(memory("numericalFlux","OneLevelTransport"),level=4)
19418  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray # <<<<<<<<<<<<<<
19419  * #use post processing tools to get conservative fluxes, None by default
19420  * from proteus import PostProcessingTools
19421  */
19422  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error)
19423  __Pyx_GOTREF(__pyx_t_2);
19424  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementInnerDiametersArray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 888, __pyx_L1_error)
19425  __Pyx_GOTREF(__pyx_t_8);
19426  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19427  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementEffectiveDiametersArray, __pyx_t_8) < 0) __PYX_ERR(0, 888, __pyx_L1_error)
19428  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19429 
19430  /* "ADR.pyx":890
19431  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray
19432  * #use post processing tools to get conservative fluxes, None by default
19433  * from proteus import PostProcessingTools # <<<<<<<<<<<<<<
19434  * self.velocityPostProcessor = PostProcessingTools.VelocityPostProcessingChooser(self)
19435  * log(memory("velocity postprocessor","OneLevelTransport"),level=4)
19436  */
19437  __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 890, __pyx_L1_error)
19438  __Pyx_GOTREF(__pyx_t_8);
19439  __Pyx_INCREF(__pyx_n_s_PostProcessingTools);
19440  __Pyx_GIVEREF(__pyx_n_s_PostProcessingTools);
19441  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_PostProcessingTools);
19442  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_8, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 890, __pyx_L1_error)
19443  __Pyx_GOTREF(__pyx_t_2);
19444  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19445  __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_PostProcessingTools); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 890, __pyx_L1_error)
19446  __Pyx_GOTREF(__pyx_t_8);
19447  __Pyx_INCREF(__pyx_t_8);
19448  __pyx_v_PostProcessingTools = __pyx_t_8;
19449  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19450  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19451 
19452  /* "ADR.pyx":891
19453  * #use post processing tools to get conservative fluxes, None by default
19454  * from proteus import PostProcessingTools
19455  * self.velocityPostProcessor = PostProcessingTools.VelocityPostProcessingChooser(self) # <<<<<<<<<<<<<<
19456  * log(memory("velocity postprocessor","OneLevelTransport"),level=4)
19457  * #helper for writing out data storage
19458  */
19459  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_PostProcessingTools, __pyx_n_s_VelocityPostProcessingChooser); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 891, __pyx_L1_error)
19460  __Pyx_GOTREF(__pyx_t_8);
19461  __pyx_t_7 = NULL;
19462  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
19463  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
19464  if (likely(__pyx_t_7)) {
19465  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
19466  __Pyx_INCREF(__pyx_t_7);
19467  __Pyx_INCREF(function);
19468  __Pyx_DECREF_SET(__pyx_t_8, function);
19469  }
19470  }
19471  if (!__pyx_t_7) {
19472  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)
19473  __Pyx_GOTREF(__pyx_t_2);
19474  } else {
19475  #if CYTHON_FAST_PYCALL
19476  if (PyFunction_Check(__pyx_t_8)) {
19477  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_self};
19478  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)
19479  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
19480  __Pyx_GOTREF(__pyx_t_2);
19481  } else
19482  #endif
19483  #if CYTHON_FAST_PYCCALL
19484  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
19485  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_self};
19486  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)
19487  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
19488  __Pyx_GOTREF(__pyx_t_2);
19489  } else
19490  #endif
19491  {
19492  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
19493  __Pyx_GOTREF(__pyx_t_1);
19494  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
19495  __Pyx_INCREF(__pyx_v_self);
19496  __Pyx_GIVEREF(__pyx_v_self);
19497  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_self);
19498  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)
19499  __Pyx_GOTREF(__pyx_t_2);
19500  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19501  }
19502  }
19503  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19504  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_velocityPostProcessor, __pyx_t_2) < 0) __PYX_ERR(0, 891, __pyx_L1_error)
19505  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19506 
19507  /* "ADR.pyx":892
19508  * from proteus import PostProcessingTools
19509  * self.velocityPostProcessor = PostProcessingTools.VelocityPostProcessingChooser(self)
19510  * log(memory("velocity postprocessor","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
19511  * #helper for writing out data storage
19512  * from proteus import Archiver
19513  */
19514  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
19515  __Pyx_GOTREF(__pyx_t_2);
19516  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_memory); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L1_error)
19517  __Pyx_GOTREF(__pyx_t_8);
19518  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
19519  __Pyx_GOTREF(__pyx_t_1);
19520  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19521  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L1_error)
19522  __Pyx_GOTREF(__pyx_t_8);
19523  __Pyx_GIVEREF(__pyx_t_1);
19524  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
19525  __pyx_t_1 = 0;
19526  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
19527  __Pyx_GOTREF(__pyx_t_1);
19528  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(0, 892, __pyx_L1_error)
19529  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 892, __pyx_L1_error)
19530  __Pyx_GOTREF(__pyx_t_7);
19531  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19532  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19533  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19534  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19535 
19536  /* "ADR.pyx":894
19537  * log(memory("velocity postprocessor","OneLevelTransport"),level=4)
19538  * #helper for writing out data storage
19539  * from proteus import Archiver # <<<<<<<<<<<<<<
19540  * self.elementQuadratureDictionaryWriter = Archiver.XdmfWriter()
19541  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19542  */
19543  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L1_error)
19544  __Pyx_GOTREF(__pyx_t_7);
19545  __Pyx_INCREF(__pyx_n_s_Archiver);
19546  __Pyx_GIVEREF(__pyx_n_s_Archiver);
19547  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_Archiver);
19548  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_7, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
19549  __Pyx_GOTREF(__pyx_t_1);
19550  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19551  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Archiver); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L1_error)
19552  __Pyx_GOTREF(__pyx_t_7);
19553  __Pyx_INCREF(__pyx_t_7);
19554  __pyx_v_Archiver = __pyx_t_7;
19555  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19556  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19557 
19558  /* "ADR.pyx":895
19559  * #helper for writing out data storage
19560  * from proteus import Archiver
19561  * self.elementQuadratureDictionaryWriter = Archiver.XdmfWriter() # <<<<<<<<<<<<<<
19562  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19563  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19564  */
19565  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_Archiver, __pyx_n_s_XdmfWriter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 895, __pyx_L1_error)
19566  __Pyx_GOTREF(__pyx_t_7);
19567  __pyx_t_8 = NULL;
19568  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
19569  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
19570  if (likely(__pyx_t_8)) {
19571  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
19572  __Pyx_INCREF(__pyx_t_8);
19573  __Pyx_INCREF(function);
19574  __Pyx_DECREF_SET(__pyx_t_7, function);
19575  }
19576  }
19577  if (__pyx_t_8) {
19578  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
19579  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19580  } else {
19581  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
19582  }
19583  __Pyx_GOTREF(__pyx_t_1);
19584  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19585  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureDictionaryWrite, __pyx_t_1) < 0) __PYX_ERR(0, 895, __pyx_L1_error)
19586  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19587 
19588  /* "ADR.pyx":896
19589  * from proteus import Archiver
19590  * self.elementQuadratureDictionaryWriter = Archiver.XdmfWriter()
19591  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter() # <<<<<<<<<<<<<<
19592  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19593  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems():
19594  */
19595  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_Archiver, __pyx_n_s_XdmfWriter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error)
19596  __Pyx_GOTREF(__pyx_t_7);
19597  __pyx_t_8 = NULL;
19598  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
19599  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
19600  if (likely(__pyx_t_8)) {
19601  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
19602  __Pyx_INCREF(__pyx_t_8);
19603  __Pyx_INCREF(function);
19604  __Pyx_DECREF_SET(__pyx_t_7, function);
19605  }
19606  }
19607  if (__pyx_t_8) {
19608  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error)
19609  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19610  } else {
19611  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error)
19612  }
19613  __Pyx_GOTREF(__pyx_t_1);
19614  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19615  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureDiction, __pyx_t_1) < 0) __PYX_ERR(0, 896, __pyx_L1_error)
19616  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19617 
19618  /* "ADR.pyx":897
19619  * self.elementQuadratureDictionaryWriter = Archiver.XdmfWriter()
19620  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19621  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter() # <<<<<<<<<<<<<<
19622  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems():
19623  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19624  */
19625  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_Archiver, __pyx_n_s_XdmfWriter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 897, __pyx_L1_error)
19626  __Pyx_GOTREF(__pyx_t_7);
19627  __pyx_t_8 = NULL;
19628  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
19629  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
19630  if (likely(__pyx_t_8)) {
19631  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
19632  __Pyx_INCREF(__pyx_t_8);
19633  __Pyx_INCREF(function);
19634  __Pyx_DECREF_SET(__pyx_t_7, function);
19635  }
19636  }
19637  if (__pyx_t_8) {
19638  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
19639  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19640  } else {
19641  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
19642  }
19643  __Pyx_GOTREF(__pyx_t_1);
19644  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19645  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_exteriorElementBoundaryQuadratur, __pyx_t_1) < 0) __PYX_ERR(0, 897, __pyx_L1_error)
19646  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19647 
19648  /* "ADR.pyx":898
19649  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19650  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19651  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems(): # <<<<<<<<<<<<<<
19652  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19653  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19654  */
19655  __pyx_t_4 = 0;
19656  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditionsObjectsDic); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L1_error)
19657  __Pyx_GOTREF(__pyx_t_7);
19658  if (unlikely(__pyx_t_7 == Py_None)) {
19659  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
19660  __PYX_ERR(0, 898, __pyx_L1_error)
19661  }
19662  __pyx_t_8 = __Pyx_dict_iterator(__pyx_t_7, 0, __pyx_n_s_iteritems, (&__pyx_t_10), (&__pyx_t_14)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 898, __pyx_L1_error)
19663  __Pyx_GOTREF(__pyx_t_8);
19664  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19665  __Pyx_XDECREF(__pyx_t_1);
19666  __pyx_t_1 = __pyx_t_8;
19667  __pyx_t_8 = 0;
19668  while (1) {
19669  __pyx_t_18 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_10, &__pyx_t_4, &__pyx_t_8, &__pyx_t_7, NULL, __pyx_t_14);
19670  if (unlikely(__pyx_t_18 == 0)) break;
19671  if (unlikely(__pyx_t_18 == -1)) __PYX_ERR(0, 898, __pyx_L1_error)
19672  __Pyx_GOTREF(__pyx_t_8);
19673  __Pyx_GOTREF(__pyx_t_7);
19674  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_8);
19675  __pyx_t_8 = 0;
19676  __Pyx_XDECREF_SET(__pyx_v_fbcObject, __pyx_t_7);
19677  __pyx_t_7 = 0;
19678 
19679  /* "ADR.pyx":899
19680  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19681  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems():
19682  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i') # <<<<<<<<<<<<<<
19683  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19684  * if self.coefficients.advection.has_key(ci):
19685  */
19686  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __pyx_L1_error)
19687  __Pyx_GOTREF(__pyx_t_8);
19688  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
19689  __Pyx_GOTREF(__pyx_t_2);
19690  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19691  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __pyx_L1_error)
19692  __Pyx_GOTREF(__pyx_t_8);
19693  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 899, __pyx_L1_error)
19694  __Pyx_GOTREF(__pyx_t_15);
19695  __Pyx_INCREF(__pyx_n_s_advectiveFlux_bc);
19696  __Pyx_GIVEREF(__pyx_n_s_advectiveFlux_bc);
19697  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_n_s_advectiveFlux_bc);
19698  __Pyx_INCREF(__pyx_v_ci);
19699  __Pyx_GIVEREF(__pyx_v_ci);
19700  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_v_ci);
19701  __pyx_t_6 = PyObject_GetItem(__pyx_t_8, __pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 899, __pyx_L1_error)
19702  __Pyx_GOTREF(__pyx_t_6);
19703  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19704  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19705  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 899, __pyx_L1_error)
19706  __Pyx_GOTREF(__pyx_t_15);
19707  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19708  __pyx_t_6 = NULL;
19709  __pyx_t_18 = 0;
19710  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
19711  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
19712  if (likely(__pyx_t_6)) {
19713  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19714  __Pyx_INCREF(__pyx_t_6);
19715  __Pyx_INCREF(function);
19716  __Pyx_DECREF_SET(__pyx_t_2, function);
19717  __pyx_t_18 = 1;
19718  }
19719  }
19720  #if CYTHON_FAST_PYCALL
19721  if (PyFunction_Check(__pyx_t_2)) {
19722  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_15, __pyx_n_s_i};
19723  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L1_error)
19724  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19725  __Pyx_GOTREF(__pyx_t_7);
19726  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19727  } else
19728  #endif
19729  #if CYTHON_FAST_PYCCALL
19730  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
19731  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_15, __pyx_n_s_i};
19732  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L1_error)
19733  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19734  __Pyx_GOTREF(__pyx_t_7);
19735  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19736  } else
19737  #endif
19738  {
19739  __pyx_t_8 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __pyx_L1_error)
19740  __Pyx_GOTREF(__pyx_t_8);
19741  if (__pyx_t_6) {
19742  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
19743  }
19744  __Pyx_GIVEREF(__pyx_t_15);
19745  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_18, __pyx_t_15);
19746  __Pyx_INCREF(__pyx_n_s_i);
19747  __Pyx_GIVEREF(__pyx_n_s_i);
19748  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_18, __pyx_n_s_i);
19749  __pyx_t_15 = 0;
19750  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L1_error)
19751  __Pyx_GOTREF(__pyx_t_7);
19752  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19753  }
19754  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19755  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
19756  __Pyx_GOTREF(__pyx_t_2);
19757  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __pyx_L1_error)
19758  __Pyx_GOTREF(__pyx_t_8);
19759  __Pyx_INCREF(__pyx_n_s_advectiveFlux_bc_flag);
19760  __Pyx_GIVEREF(__pyx_n_s_advectiveFlux_bc_flag);
19761  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_advectiveFlux_bc_flag);
19762  __Pyx_INCREF(__pyx_v_ci);
19763  __Pyx_GIVEREF(__pyx_v_ci);
19764  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ci);
19765  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_8, __pyx_t_7) < 0)) __PYX_ERR(0, 899, __pyx_L1_error)
19766  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19767  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19768  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19769 
19770  /* "ADR.pyx":900
19771  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems():
19772  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19773  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems(): # <<<<<<<<<<<<<<
19774  * if self.coefficients.advection.has_key(ci):
19775  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19776  */
19777  __pyx_t_12 = 0;
19778  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_fbcObject, __pyx_n_s_advectiveFluxBoundaryConditionsD); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 900, __pyx_L1_error)
19779  __Pyx_GOTREF(__pyx_t_8);
19780  if (unlikely(__pyx_t_8 == Py_None)) {
19781  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
19782  __PYX_ERR(0, 900, __pyx_L1_error)
19783  }
19784  __pyx_t_2 = __Pyx_dict_iterator(__pyx_t_8, 0, __pyx_n_s_iteritems, (&__pyx_t_19), (&__pyx_t_18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 900, __pyx_L1_error)
19785  __Pyx_GOTREF(__pyx_t_2);
19786  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19787  __Pyx_XDECREF(__pyx_t_7);
19788  __pyx_t_7 = __pyx_t_2;
19789  __pyx_t_2 = 0;
19790  while (1) {
19791  __pyx_t_20 = __Pyx_dict_iter_next(__pyx_t_7, __pyx_t_19, &__pyx_t_12, &__pyx_t_2, &__pyx_t_8, NULL, __pyx_t_18);
19792  if (unlikely(__pyx_t_20 == 0)) break;
19793  if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(0, 900, __pyx_L1_error)
19794  __Pyx_GOTREF(__pyx_t_2);
19795  __Pyx_GOTREF(__pyx_t_8);
19796  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
19797  __pyx_t_2 = 0;
19798  __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_8);
19799  __pyx_t_8 = 0;
19800 
19801  /* "ADR.pyx":901
19802  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19803  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19804  * if self.coefficients.advection.has_key(ci): # <<<<<<<<<<<<<<
19805  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19806  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
19807  */
19808  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error)
19809  __Pyx_GOTREF(__pyx_t_2);
19810  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_advection); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 901, __pyx_L1_error)
19811  __Pyx_GOTREF(__pyx_t_15);
19812  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19813  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error)
19814  __Pyx_GOTREF(__pyx_t_2);
19815  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19816  __pyx_t_15 = NULL;
19817  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
19818  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
19819  if (likely(__pyx_t_15)) {
19820  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19821  __Pyx_INCREF(__pyx_t_15);
19822  __Pyx_INCREF(function);
19823  __Pyx_DECREF_SET(__pyx_t_2, function);
19824  }
19825  }
19826  if (!__pyx_t_15) {
19827  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L1_error)
19828  __Pyx_GOTREF(__pyx_t_8);
19829  } else {
19830  #if CYTHON_FAST_PYCALL
19831  if (PyFunction_Check(__pyx_t_2)) {
19832  PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_ci};
19833  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L1_error)
19834  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
19835  __Pyx_GOTREF(__pyx_t_8);
19836  } else
19837  #endif
19838  #if CYTHON_FAST_PYCCALL
19839  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
19840  PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_ci};
19841  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L1_error)
19842  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
19843  __Pyx_GOTREF(__pyx_t_8);
19844  } else
19845  #endif
19846  {
19847  __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 901, __pyx_L1_error)
19848  __Pyx_GOTREF(__pyx_t_6);
19849  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15); __pyx_t_15 = NULL;
19850  __Pyx_INCREF(__pyx_v_ci);
19851  __Pyx_GIVEREF(__pyx_v_ci);
19852  PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_ci);
19853  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L1_error)
19854  __Pyx_GOTREF(__pyx_t_8);
19855  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19856  }
19857  }
19858  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19859  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 901, __pyx_L1_error)
19860  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19861  if (__pyx_t_17) {
19862 
19863  /* "ADR.pyx":902
19864  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19865  * if self.coefficients.advection.has_key(ci):
19866  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t) # <<<<<<<<<<<<<<
19867  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
19868  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems():
19869  */
19870  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error)
19871  __Pyx_GOTREF(__pyx_t_2);
19872  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error)
19873  __Pyx_GOTREF(__pyx_t_6);
19874  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19875  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error)
19876  __Pyx_GOTREF(__pyx_t_2);
19877  __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 902, __pyx_L1_error)
19878  __Pyx_GOTREF(__pyx_t_15);
19879  __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 902, __pyx_L1_error)
19880  __Pyx_GOTREF(__pyx_t_21);
19881  __Pyx_GIVEREF(__pyx_t_2);
19882  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_2);
19883  __Pyx_GIVEREF(__pyx_t_15);
19884  PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_15);
19885  __pyx_t_2 = 0;
19886  __pyx_t_15 = 0;
19887  __pyx_t_15 = PyObject_GetItem(__pyx_t_6, __pyx_t_21); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 902, __pyx_L1_error)
19888  __Pyx_GOTREF(__pyx_t_15);
19889  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19890  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19891  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 902, __pyx_L1_error)
19892  __Pyx_GOTREF(__pyx_t_21);
19893  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_t); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error)
19894  __Pyx_GOTREF(__pyx_t_6);
19895  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19896  __Pyx_INCREF(__pyx_v_g);
19897  __pyx_t_21 = __pyx_v_g; __pyx_t_2 = NULL;
19898  __pyx_t_20 = 0;
19899  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_21))) {
19900  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_21);
19901  if (likely(__pyx_t_2)) {
19902  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21);
19903  __Pyx_INCREF(__pyx_t_2);
19904  __Pyx_INCREF(function);
19905  __Pyx_DECREF_SET(__pyx_t_21, function);
19906  __pyx_t_20 = 1;
19907  }
19908  }
19909  #if CYTHON_FAST_PYCALL
19910  if (PyFunction_Check(__pyx_t_21)) {
19911  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_t_6};
19912  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_21, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 902, __pyx_L1_error)
19913  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19914  __Pyx_GOTREF(__pyx_t_8);
19915  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19916  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19917  } else
19918  #endif
19919  #if CYTHON_FAST_PYCCALL
19920  if (__Pyx_PyFastCFunction_Check(__pyx_t_21)) {
19921  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_t_6};
19922  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_21, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 902, __pyx_L1_error)
19923  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19924  __Pyx_GOTREF(__pyx_t_8);
19925  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19926  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19927  } else
19928  #endif
19929  {
19930  __pyx_t_22 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 902, __pyx_L1_error)
19931  __Pyx_GOTREF(__pyx_t_22);
19932  if (__pyx_t_2) {
19933  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_2); __pyx_t_2 = NULL;
19934  }
19935  __Pyx_GIVEREF(__pyx_t_15);
19936  PyTuple_SET_ITEM(__pyx_t_22, 0+__pyx_t_20, __pyx_t_15);
19937  __Pyx_GIVEREF(__pyx_t_6);
19938  PyTuple_SET_ITEM(__pyx_t_22, 1+__pyx_t_20, __pyx_t_6);
19939  __pyx_t_15 = 0;
19940  __pyx_t_6 = 0;
19941  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_t_22, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 902, __pyx_L1_error)
19942  __Pyx_GOTREF(__pyx_t_8);
19943  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
19944  }
19945  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19946  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 902, __pyx_L1_error)
19947  __Pyx_GOTREF(__pyx_t_21);
19948  __pyx_t_22 = PyTuple_New(2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 902, __pyx_L1_error)
19949  __Pyx_GOTREF(__pyx_t_22);
19950  __Pyx_INCREF(__pyx_n_s_advectiveFlux_bc);
19951  __Pyx_GIVEREF(__pyx_n_s_advectiveFlux_bc);
19952  PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_n_s_advectiveFlux_bc);
19953  __Pyx_INCREF(__pyx_v_ci);
19954  __Pyx_GIVEREF(__pyx_v_ci);
19955  PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_v_ci);
19956  __pyx_t_6 = PyObject_GetItem(__pyx_t_21, __pyx_t_22); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error)
19957  __Pyx_GOTREF(__pyx_t_6);
19958  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19959  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
19960  __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 902, __pyx_L1_error)
19961  __Pyx_GOTREF(__pyx_t_22);
19962  __pyx_t_21 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 902, __pyx_L1_error)
19963  __Pyx_GOTREF(__pyx_t_21);
19964  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 902, __pyx_L1_error)
19965  __Pyx_GOTREF(__pyx_t_15);
19966  __Pyx_GIVEREF(__pyx_t_22);
19967  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_22);
19968  __Pyx_GIVEREF(__pyx_t_21);
19969  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_21);
19970  __pyx_t_22 = 0;
19971  __pyx_t_21 = 0;
19972  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_t_15, __pyx_t_8) < 0)) __PYX_ERR(0, 902, __pyx_L1_error)
19973  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19974  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19975  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19976 
19977  /* "ADR.pyx":903
19978  * if self.coefficients.advection.has_key(ci):
19979  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19980  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1 # <<<<<<<<<<<<<<
19981  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems():
19982  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i')
19983  */
19984  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 903, __pyx_L1_error)
19985  __Pyx_GOTREF(__pyx_t_8);
19986  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 903, __pyx_L1_error)
19987  __Pyx_GOTREF(__pyx_t_15);
19988  __Pyx_INCREF(__pyx_n_s_advectiveFlux_bc_flag);
19989  __Pyx_GIVEREF(__pyx_n_s_advectiveFlux_bc_flag);
19990  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_n_s_advectiveFlux_bc_flag);
19991  __Pyx_INCREF(__pyx_v_ci);
19992  __Pyx_GIVEREF(__pyx_v_ci);
19993  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_v_ci);
19994  __pyx_t_6 = PyObject_GetItem(__pyx_t_8, __pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 903, __pyx_L1_error)
19995  __Pyx_GOTREF(__pyx_t_6);
19996  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19997  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19998  __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 903, __pyx_L1_error)
19999  __Pyx_GOTREF(__pyx_t_15);
20000  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 903, __pyx_L1_error)
20001  __Pyx_GOTREF(__pyx_t_8);
20002  __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 903, __pyx_L1_error)
20003  __Pyx_GOTREF(__pyx_t_21);
20004  __Pyx_GIVEREF(__pyx_t_15);
20005  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_15);
20006  __Pyx_GIVEREF(__pyx_t_8);
20007  PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_8);
20008  __pyx_t_15 = 0;
20009  __pyx_t_8 = 0;
20010  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_t_21, __pyx_int_1) < 0)) __PYX_ERR(0, 903, __pyx_L1_error)
20011  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20012  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20013 
20014  /* "ADR.pyx":901
20015  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
20016  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
20017  * if self.coefficients.advection.has_key(ci): # <<<<<<<<<<<<<<
20018  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
20019  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
20020  */
20021  }
20022  }
20023  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20024 
20025  /* "ADR.pyx":904
20026  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
20027  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
20028  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems(): # <<<<<<<<<<<<<<
20029  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i')
20030  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems():
20031  */
20032  __pyx_t_19 = 0;
20033  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_fbcObject, __pyx_n_s_diffusiveFluxBoundaryConditionsD); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 904, __pyx_L1_error)
20034  __Pyx_GOTREF(__pyx_t_21);
20035  if (unlikely(__pyx_t_21 == Py_None)) {
20036  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
20037  __PYX_ERR(0, 904, __pyx_L1_error)
20038  }
20039  __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_21, 0, __pyx_n_s_iteritems, (&__pyx_t_12), (&__pyx_t_18)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 904, __pyx_L1_error)
20040  __Pyx_GOTREF(__pyx_t_6);
20041  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20042  __Pyx_XDECREF(__pyx_t_7);
20043  __pyx_t_7 = __pyx_t_6;
20044  __pyx_t_6 = 0;
20045  while (1) {
20046  __pyx_t_20 = __Pyx_dict_iter_next(__pyx_t_7, __pyx_t_12, &__pyx_t_19, &__pyx_t_6, &__pyx_t_21, NULL, __pyx_t_18);
20047  if (unlikely(__pyx_t_20 == 0)) break;
20048  if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(0, 904, __pyx_L1_error)
20049  __Pyx_GOTREF(__pyx_t_6);
20050  __Pyx_GOTREF(__pyx_t_21);
20051  __Pyx_XDECREF_SET(__pyx_v_ck, __pyx_t_6);
20052  __pyx_t_6 = 0;
20053  __Pyx_XDECREF_SET(__pyx_v_diffusiveFluxBoundaryConditionsDict, __pyx_t_21);
20054  __pyx_t_21 = 0;
20055 
20056  /* "ADR.pyx":905
20057  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
20058  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems():
20059  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i') # <<<<<<<<<<<<<<
20060  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems():
20061  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
20062  */
20063  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L1_error)
20064  __Pyx_GOTREF(__pyx_t_6);
20065  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 905, __pyx_L1_error)
20066  __Pyx_GOTREF(__pyx_t_8);
20067  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20068  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L1_error)
20069  __Pyx_GOTREF(__pyx_t_6);
20070  __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 905, __pyx_L1_error)
20071  __Pyx_GOTREF(__pyx_t_15);
20072  __Pyx_INCREF(__pyx_n_s_diffusiveFlux_bc);
20073  __Pyx_GIVEREF(__pyx_n_s_diffusiveFlux_bc);
20074  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_n_s_diffusiveFlux_bc);
20075  __Pyx_INCREF(__pyx_v_ck);
20076  __Pyx_GIVEREF(__pyx_v_ck);
20077  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_v_ck);
20078  __Pyx_INCREF(__pyx_v_ci);
20079  __Pyx_GIVEREF(__pyx_v_ci);
20080  PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_v_ci);
20081  __pyx_t_22 = PyObject_GetItem(__pyx_t_6, __pyx_t_15); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 905, __pyx_L1_error)
20082  __Pyx_GOTREF(__pyx_t_22);
20083  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20084  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20085  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_shape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 905, __pyx_L1_error)
20086  __Pyx_GOTREF(__pyx_t_15);
20087  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
20088  __pyx_t_22 = NULL;
20089  __pyx_t_20 = 0;
20090  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
20091  __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_8);
20092  if (likely(__pyx_t_22)) {
20093  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
20094  __Pyx_INCREF(__pyx_t_22);
20095  __Pyx_INCREF(function);
20096  __Pyx_DECREF_SET(__pyx_t_8, function);
20097  __pyx_t_20 = 1;
20098  }
20099  }
20100  #if CYTHON_FAST_PYCALL
20101  if (PyFunction_Check(__pyx_t_8)) {
20102  PyObject *__pyx_temp[3] = {__pyx_t_22, __pyx_t_15, __pyx_n_s_i};
20103  __pyx_t_21 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 905, __pyx_L1_error)
20104  __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
20105  __Pyx_GOTREF(__pyx_t_21);
20106  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20107  } else
20108  #endif
20109  #if CYTHON_FAST_PYCCALL
20110  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
20111  PyObject *__pyx_temp[3] = {__pyx_t_22, __pyx_t_15, __pyx_n_s_i};
20112  __pyx_t_21 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 905, __pyx_L1_error)
20113  __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
20114  __Pyx_GOTREF(__pyx_t_21);
20115  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20116  } else
20117  #endif
20118  {
20119  __pyx_t_6 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L1_error)
20120  __Pyx_GOTREF(__pyx_t_6);
20121  if (__pyx_t_22) {
20122  __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_22); __pyx_t_22 = NULL;
20123  }
20124  __Pyx_GIVEREF(__pyx_t_15);
20125  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_20, __pyx_t_15);
20126  __Pyx_INCREF(__pyx_n_s_i);
20127  __Pyx_GIVEREF(__pyx_n_s_i);
20128  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_20, __pyx_n_s_i);
20129  __pyx_t_15 = 0;
20130  __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 905, __pyx_L1_error)
20131  __Pyx_GOTREF(__pyx_t_21);
20132  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20133  }
20134  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20135  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 905, __pyx_L1_error)
20136  __Pyx_GOTREF(__pyx_t_8);
20137  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L1_error)
20138  __Pyx_GOTREF(__pyx_t_6);
20139  __Pyx_INCREF(__pyx_n_s_diffusiveFlux_bc_flag);
20140  __Pyx_GIVEREF(__pyx_n_s_diffusiveFlux_bc_flag);
20141  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_diffusiveFlux_bc_flag);
20142  __Pyx_INCREF(__pyx_v_ck);
20143  __Pyx_GIVEREF(__pyx_v_ck);
20144  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ck);
20145  __Pyx_INCREF(__pyx_v_ci);
20146  __Pyx_GIVEREF(__pyx_v_ci);
20147  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ci);
20148  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_t_6, __pyx_t_21) < 0)) __PYX_ERR(0, 905, __pyx_L1_error)
20149  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20150  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20151  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20152 
20153  /* "ADR.pyx":906
20154  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems():
20155  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i')
20156  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems(): # <<<<<<<<<<<<<<
20157  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
20158  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
20159  */
20160  __pyx_t_23 = 0;
20161  if (unlikely(__pyx_v_diffusiveFluxBoundaryConditionsDict == Py_None)) {
20162  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
20163  __PYX_ERR(0, 906, __pyx_L1_error)
20164  }
20165  __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_diffusiveFluxBoundaryConditionsDict, 0, __pyx_n_s_iteritems, (&__pyx_t_24), (&__pyx_t_20)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 906, __pyx_L1_error)
20166  __Pyx_GOTREF(__pyx_t_6);
20167  __Pyx_XDECREF(__pyx_t_21);
20168  __pyx_t_21 = __pyx_t_6;
20169  __pyx_t_6 = 0;
20170  while (1) {
20171  __pyx_t_25 = __Pyx_dict_iter_next(__pyx_t_21, __pyx_t_24, &__pyx_t_23, &__pyx_t_6, &__pyx_t_8, NULL, __pyx_t_20);
20172  if (unlikely(__pyx_t_25 == 0)) break;
20173  if (unlikely(__pyx_t_25 == -1)) __PYX_ERR(0, 906, __pyx_L1_error)
20174  __Pyx_GOTREF(__pyx_t_6);
20175  __Pyx_GOTREF(__pyx_t_8);
20176  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
20177  __pyx_t_6 = 0;
20178  __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_8);
20179  __pyx_t_8 = 0;
20180 
20181  /* "ADR.pyx":907
20182  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i')
20183  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems():
20184  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t) # <<<<<<<<<<<<<<
20185  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
20186  * self.numericalFlux.setDirichletValues(self.ebqe)
20187  */
20188  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 907, __pyx_L1_error)
20189  __Pyx_GOTREF(__pyx_t_6);
20190  __pyx_t_15 = PyObject_GetItem(__pyx_t_6, __pyx_n_s_x); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 907, __pyx_L1_error)
20191  __Pyx_GOTREF(__pyx_t_15);
20192  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20193  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 907, __pyx_L1_error)
20194  __Pyx_GOTREF(__pyx_t_6);
20195  __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 907, __pyx_L1_error)
20196  __Pyx_GOTREF(__pyx_t_22);
20197  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error)
20198  __Pyx_GOTREF(__pyx_t_2);
20199  __Pyx_GIVEREF(__pyx_t_6);
20200  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
20201  __Pyx_GIVEREF(__pyx_t_22);
20202  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_22);
20203  __pyx_t_6 = 0;
20204  __pyx_t_22 = 0;
20205  __pyx_t_22 = PyObject_GetItem(__pyx_t_15, __pyx_t_2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 907, __pyx_L1_error)
20206  __Pyx_GOTREF(__pyx_t_22);
20207  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20208  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20209  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error)
20210  __Pyx_GOTREF(__pyx_t_2);
20211  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 907, __pyx_L1_error)
20212  __Pyx_GOTREF(__pyx_t_15);
20213  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20214  __Pyx_INCREF(__pyx_v_g);
20215  __pyx_t_2 = __pyx_v_g; __pyx_t_6 = NULL;
20216  __pyx_t_25 = 0;
20217  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
20218  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
20219  if (likely(__pyx_t_6)) {
20220  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
20221  __Pyx_INCREF(__pyx_t_6);
20222  __Pyx_INCREF(function);
20223  __Pyx_DECREF_SET(__pyx_t_2, function);
20224  __pyx_t_25 = 1;
20225  }
20226  }
20227  #if CYTHON_FAST_PYCALL
20228  if (PyFunction_Check(__pyx_t_2)) {
20229  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_22, __pyx_t_15};
20230  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error)
20231  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20232  __Pyx_GOTREF(__pyx_t_8);
20233  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
20234  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20235  } else
20236  #endif
20237  #if CYTHON_FAST_PYCCALL
20238  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
20239  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_22, __pyx_t_15};
20240  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error)
20241  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20242  __Pyx_GOTREF(__pyx_t_8);
20243  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
20244  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20245  } else
20246  #endif
20247  {
20248  __pyx_t_26 = PyTuple_New(2+__pyx_t_25); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 907, __pyx_L1_error)
20249  __Pyx_GOTREF(__pyx_t_26);
20250  if (__pyx_t_6) {
20251  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_6); __pyx_t_6 = NULL;
20252  }
20253  __Pyx_GIVEREF(__pyx_t_22);
20254  PyTuple_SET_ITEM(__pyx_t_26, 0+__pyx_t_25, __pyx_t_22);
20255  __Pyx_GIVEREF(__pyx_t_15);
20256  PyTuple_SET_ITEM(__pyx_t_26, 1+__pyx_t_25, __pyx_t_15);
20257  __pyx_t_22 = 0;
20258  __pyx_t_15 = 0;
20259  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_26, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error)
20260  __Pyx_GOTREF(__pyx_t_8);
20261  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
20262  }
20263  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20264  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error)
20265  __Pyx_GOTREF(__pyx_t_2);
20266  __pyx_t_26 = PyTuple_New(3); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 907, __pyx_L1_error)
20267  __Pyx_GOTREF(__pyx_t_26);
20268  __Pyx_INCREF(__pyx_n_s_diffusiveFlux_bc);
20269  __Pyx_GIVEREF(__pyx_n_s_diffusiveFlux_bc);
20270  PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_n_s_diffusiveFlux_bc);
20271  __Pyx_INCREF(__pyx_v_ck);
20272  __Pyx_GIVEREF(__pyx_v_ck);
20273  PyTuple_SET_ITEM(__pyx_t_26, 1, __pyx_v_ck);
20274  __Pyx_INCREF(__pyx_v_ci);
20275  __Pyx_GIVEREF(__pyx_v_ci);
20276  PyTuple_SET_ITEM(__pyx_t_26, 2, __pyx_v_ci);
20277  __pyx_t_15 = PyObject_GetItem(__pyx_t_2, __pyx_t_26); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 907, __pyx_L1_error)
20278  __Pyx_GOTREF(__pyx_t_15);
20279  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20280  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
20281  __pyx_t_26 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 907, __pyx_L1_error)
20282  __Pyx_GOTREF(__pyx_t_26);
20283  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error)
20284  __Pyx_GOTREF(__pyx_t_2);
20285  __pyx_t_22 = PyTuple_New(2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 907, __pyx_L1_error)
20286  __Pyx_GOTREF(__pyx_t_22);
20287  __Pyx_GIVEREF(__pyx_t_26);
20288  PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_26);
20289  __Pyx_GIVEREF(__pyx_t_2);
20290  PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_2);
20291  __pyx_t_26 = 0;
20292  __pyx_t_2 = 0;
20293  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_t_22, __pyx_t_8) < 0)) __PYX_ERR(0, 907, __pyx_L1_error)
20294  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20295  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
20296  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20297 
20298  /* "ADR.pyx":908
20299  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems():
20300  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
20301  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1 # <<<<<<<<<<<<<<
20302  * self.numericalFlux.setDirichletValues(self.ebqe)
20303  * if self.movingDomain:
20304  */
20305  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 908, __pyx_L1_error)
20306  __Pyx_GOTREF(__pyx_t_8);
20307  __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 908, __pyx_L1_error)
20308  __Pyx_GOTREF(__pyx_t_22);
20309  __Pyx_INCREF(__pyx_n_s_diffusiveFlux_bc_flag);
20310  __Pyx_GIVEREF(__pyx_n_s_diffusiveFlux_bc_flag);
20311  PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_n_s_diffusiveFlux_bc_flag);
20312  __Pyx_INCREF(__pyx_v_ck);
20313  __Pyx_GIVEREF(__pyx_v_ck);
20314  PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_v_ck);
20315  __Pyx_INCREF(__pyx_v_ci);
20316  __Pyx_GIVEREF(__pyx_v_ci);
20317  PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_v_ci);
20318  __pyx_t_15 = PyObject_GetItem(__pyx_t_8, __pyx_t_22); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 908, __pyx_L1_error)
20319  __Pyx_GOTREF(__pyx_t_15);
20320  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20321  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
20322  __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 908, __pyx_L1_error)
20323  __Pyx_GOTREF(__pyx_t_22);
20324  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 908, __pyx_L1_error)
20325  __Pyx_GOTREF(__pyx_t_8);
20326  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error)
20327  __Pyx_GOTREF(__pyx_t_2);
20328  __Pyx_GIVEREF(__pyx_t_22);
20329  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_22);
20330  __Pyx_GIVEREF(__pyx_t_8);
20331  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
20332  __pyx_t_22 = 0;
20333  __pyx_t_8 = 0;
20334  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_t_2, __pyx_int_1) < 0)) __PYX_ERR(0, 908, __pyx_L1_error)
20335  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20336  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20337  }
20338  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20339  }
20340  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20341  }
20342  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20343 
20344  /* "ADR.pyx":909
20345  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
20346  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
20347  * self.numericalFlux.setDirichletValues(self.ebqe) # <<<<<<<<<<<<<<
20348  * if self.movingDomain:
20349  * self.MOVING_DOMAIN=1.0
20350  */
20351  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error)
20352  __Pyx_GOTREF(__pyx_t_7);
20353  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setDirichletValues); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 909, __pyx_L1_error)
20354  __Pyx_GOTREF(__pyx_t_21);
20355  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20356  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error)
20357  __Pyx_GOTREF(__pyx_t_7);
20358  __pyx_t_2 = NULL;
20359  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_21))) {
20360  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_21);
20361  if (likely(__pyx_t_2)) {
20362  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21);
20363  __Pyx_INCREF(__pyx_t_2);
20364  __Pyx_INCREF(function);
20365  __Pyx_DECREF_SET(__pyx_t_21, function);
20366  }
20367  }
20368  if (!__pyx_t_2) {
20369  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_21, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
20370  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20371  __Pyx_GOTREF(__pyx_t_1);
20372  } else {
20373  #if CYTHON_FAST_PYCALL
20374  if (PyFunction_Check(__pyx_t_21)) {
20375  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_7};
20376  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_21, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
20377  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20378  __Pyx_GOTREF(__pyx_t_1);
20379  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20380  } else
20381  #endif
20382  #if CYTHON_FAST_PYCCALL
20383  if (__Pyx_PyFastCFunction_Check(__pyx_t_21)) {
20384  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_7};
20385  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_21, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
20386  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20387  __Pyx_GOTREF(__pyx_t_1);
20388  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20389  } else
20390  #endif
20391  {
20392  __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 909, __pyx_L1_error)
20393  __Pyx_GOTREF(__pyx_t_15);
20394  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_2); __pyx_t_2 = NULL;
20395  __Pyx_GIVEREF(__pyx_t_7);
20396  PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_7);
20397  __pyx_t_7 = 0;
20398  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
20399  __Pyx_GOTREF(__pyx_t_1);
20400  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20401  }
20402  }
20403  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20404  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20405 
20406  /* "ADR.pyx":910
20407  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
20408  * self.numericalFlux.setDirichletValues(self.ebqe)
20409  * if self.movingDomain: # <<<<<<<<<<<<<<
20410  * self.MOVING_DOMAIN=1.0
20411  * else:
20412  */
20413  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_movingDomain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
20414  __Pyx_GOTREF(__pyx_t_1);
20415  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 910, __pyx_L1_error)
20416  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20417  if (__pyx_t_17) {
20418 
20419  /* "ADR.pyx":911
20420  * self.numericalFlux.setDirichletValues(self.ebqe)
20421  * if self.movingDomain:
20422  * self.MOVING_DOMAIN=1.0 # <<<<<<<<<<<<<<
20423  * else:
20424  * self.MOVING_DOMAIN=0.0
20425  */
20426  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MOVING_DOMAIN, __pyx_float_1_0) < 0) __PYX_ERR(0, 911, __pyx_L1_error)
20427 
20428  /* "ADR.pyx":910
20429  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
20430  * self.numericalFlux.setDirichletValues(self.ebqe)
20431  * if self.movingDomain: # <<<<<<<<<<<<<<
20432  * self.MOVING_DOMAIN=1.0
20433  * else:
20434  */
20435  goto __pyx_L132;
20436  }
20437 
20438  /* "ADR.pyx":913
20439  * self.MOVING_DOMAIN=1.0
20440  * else:
20441  * self.MOVING_DOMAIN=0.0 # <<<<<<<<<<<<<<
20442  * #cek hack
20443  * self.movingDomain=False
20444  */
20445  /*else*/ {
20446  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MOVING_DOMAIN, __pyx_float_0_0) < 0) __PYX_ERR(0, 913, __pyx_L1_error)
20447  }
20448  __pyx_L132:;
20449 
20450  /* "ADR.pyx":915
20451  * self.MOVING_DOMAIN=0.0
20452  * #cek hack
20453  * self.movingDomain=False # <<<<<<<<<<<<<<
20454  * self.MOVING_DOMAIN=0.0
20455  * if self.mesh.nodeVelocityArray is None:
20456  */
20457  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_movingDomain, Py_False) < 0) __PYX_ERR(0, 915, __pyx_L1_error)
20458 
20459  /* "ADR.pyx":916
20460  * #cek hack
20461  * self.movingDomain=False
20462  * self.MOVING_DOMAIN=0.0 # <<<<<<<<<<<<<<
20463  * if self.mesh.nodeVelocityArray is None:
20464  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d')
20465  */
20466  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MOVING_DOMAIN, __pyx_float_0_0) < 0) __PYX_ERR(0, 916, __pyx_L1_error)
20467 
20468  /* "ADR.pyx":917
20469  * self.movingDomain=False
20470  * self.MOVING_DOMAIN=0.0
20471  * if self.mesh.nodeVelocityArray is None: # <<<<<<<<<<<<<<
20472  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d')
20473  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20474  */
20475  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
20476  __Pyx_GOTREF(__pyx_t_1);
20477  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nodeVelocityArray); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 917, __pyx_L1_error)
20478  __Pyx_GOTREF(__pyx_t_21);
20479  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20480  __pyx_t_17 = (__pyx_t_21 == Py_None);
20481  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20482  __pyx_t_9 = (__pyx_t_17 != 0);
20483  if (__pyx_t_9) {
20484 
20485  /* "ADR.pyx":918
20486  * self.MOVING_DOMAIN=0.0
20487  * if self.mesh.nodeVelocityArray is None:
20488  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d') # <<<<<<<<<<<<<<
20489  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20490  * self.forceStrongConditions=coefficients.forceStrongDirichlet
20491  */
20492  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
20493  __Pyx_GOTREF(__pyx_t_1);
20494  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 918, __pyx_L1_error)
20495  __Pyx_GOTREF(__pyx_t_15);
20496  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20497  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
20498  __Pyx_GOTREF(__pyx_t_1);
20499  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 918, __pyx_L1_error)
20500  __Pyx_GOTREF(__pyx_t_7);
20501  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20502  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
20503  __Pyx_GOTREF(__pyx_t_1);
20504  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20505  __pyx_t_7 = NULL;
20506  __pyx_t_14 = 0;
20507  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
20508  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_15);
20509  if (likely(__pyx_t_7)) {
20510  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
20511  __Pyx_INCREF(__pyx_t_7);
20512  __Pyx_INCREF(function);
20513  __Pyx_DECREF_SET(__pyx_t_15, function);
20514  __pyx_t_14 = 1;
20515  }
20516  }
20517  #if CYTHON_FAST_PYCALL
20518  if (PyFunction_Check(__pyx_t_15)) {
20519  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
20520  __pyx_t_21 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 918, __pyx_L1_error)
20521  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
20522  __Pyx_GOTREF(__pyx_t_21);
20523  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20524  } else
20525  #endif
20526  #if CYTHON_FAST_PYCCALL
20527  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
20528  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
20529  __pyx_t_21 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 918, __pyx_L1_error)
20530  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
20531  __Pyx_GOTREF(__pyx_t_21);
20532  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20533  } else
20534  #endif
20535  {
20536  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error)
20537  __Pyx_GOTREF(__pyx_t_2);
20538  if (__pyx_t_7) {
20539  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
20540  }
20541  __Pyx_GIVEREF(__pyx_t_1);
20542  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_t_1);
20543  __Pyx_INCREF(__pyx_n_s_d);
20544  __Pyx_GIVEREF(__pyx_n_s_d);
20545  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_n_s_d);
20546  __pyx_t_1 = 0;
20547  __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_2, NULL); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 918, __pyx_L1_error)
20548  __Pyx_GOTREF(__pyx_t_21);
20549  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20550  }
20551  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20552  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 918, __pyx_L1_error)
20553  __Pyx_GOTREF(__pyx_t_15);
20554  if (__Pyx_PyObject_SetAttrStr(__pyx_t_15, __pyx_n_s_nodeVelocityArray, __pyx_t_21) < 0) __PYX_ERR(0, 918, __pyx_L1_error)
20555  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20556  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20557 
20558  /* "ADR.pyx":917
20559  * self.movingDomain=False
20560  * self.MOVING_DOMAIN=0.0
20561  * if self.mesh.nodeVelocityArray is None: # <<<<<<<<<<<<<<
20562  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d')
20563  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20564  */
20565  }
20566 
20567  /* "ADR.pyx":920
20568  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d')
20569  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20570  * self.forceStrongConditions=coefficients.forceStrongDirichlet # <<<<<<<<<<<<<<
20571  * self.dirichletConditionsForceDOF = {}
20572  * if self.forceStrongConditions:
20573  */
20574  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_forceStrongDirichlet); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 920, __pyx_L1_error)
20575  __Pyx_GOTREF(__pyx_t_15);
20576  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_forceStrongConditions, __pyx_t_15) < 0) __PYX_ERR(0, 920, __pyx_L1_error)
20577  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20578 
20579  /* "ADR.pyx":921
20580  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20581  * self.forceStrongConditions=coefficients.forceStrongDirichlet
20582  * self.dirichletConditionsForceDOF = {} # <<<<<<<<<<<<<<
20583  * if self.forceStrongConditions:
20584  * for cj in range(self.nc):
20585  */
20586  __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 921, __pyx_L1_error)
20587  __Pyx_GOTREF(__pyx_t_15);
20588  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirichletConditionsForceDOF, __pyx_t_15) < 0) __PYX_ERR(0, 921, __pyx_L1_error)
20589  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20590 
20591  /* "ADR.pyx":922
20592  * self.forceStrongConditions=coefficients.forceStrongDirichlet
20593  * self.dirichletConditionsForceDOF = {}
20594  * if self.forceStrongConditions: # <<<<<<<<<<<<<<
20595  * for cj in range(self.nc):
20596  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20597  */
20598  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_forceStrongConditions); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 922, __pyx_L1_error)
20599  __Pyx_GOTREF(__pyx_t_15);
20600  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 922, __pyx_L1_error)
20601  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20602  if (__pyx_t_9) {
20603 
20604  /* "ADR.pyx":923
20605  * self.dirichletConditionsForceDOF = {}
20606  * if self.forceStrongConditions:
20607  * for cj in range(self.nc): # <<<<<<<<<<<<<<
20608  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20609  * compKernelFlag = 0
20610  */
20611  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 923, __pyx_L1_error)
20612  __Pyx_GOTREF(__pyx_t_15);
20613  __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 923, __pyx_L1_error)
20614  __Pyx_GOTREF(__pyx_t_21);
20615  __Pyx_GIVEREF(__pyx_t_15);
20616  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_15);
20617  __pyx_t_15 = 0;
20618  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_21, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 923, __pyx_L1_error)
20619  __Pyx_GOTREF(__pyx_t_15);
20620  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20621  if (likely(PyList_CheckExact(__pyx_t_15)) || PyTuple_CheckExact(__pyx_t_15)) {
20622  __pyx_t_21 = __pyx_t_15; __Pyx_INCREF(__pyx_t_21); __pyx_t_10 = 0;
20623  __pyx_t_5 = NULL;
20624  } else {
20625  __pyx_t_10 = -1; __pyx_t_21 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 923, __pyx_L1_error)
20626  __Pyx_GOTREF(__pyx_t_21);
20627  __pyx_t_5 = Py_TYPE(__pyx_t_21)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 923, __pyx_L1_error)
20628  }
20629  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20630  for (;;) {
20631  if (likely(!__pyx_t_5)) {
20632  if (likely(PyList_CheckExact(__pyx_t_21))) {
20633  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_21)) break;
20634  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
20635  __pyx_t_15 = PyList_GET_ITEM(__pyx_t_21, __pyx_t_10); __Pyx_INCREF(__pyx_t_15); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 923, __pyx_L1_error)
20636  #else
20637  __pyx_t_15 = PySequence_ITEM(__pyx_t_21, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 923, __pyx_L1_error)
20638  __Pyx_GOTREF(__pyx_t_15);
20639  #endif
20640  } else {
20641  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_21)) break;
20642  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
20643  __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_21, __pyx_t_10); __Pyx_INCREF(__pyx_t_15); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 923, __pyx_L1_error)
20644  #else
20645  __pyx_t_15 = PySequence_ITEM(__pyx_t_21, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 923, __pyx_L1_error)
20646  __Pyx_GOTREF(__pyx_t_15);
20647  #endif
20648  }
20649  } else {
20650  __pyx_t_15 = __pyx_t_5(__pyx_t_21);
20651  if (unlikely(!__pyx_t_15)) {
20652  PyObject* exc_type = PyErr_Occurred();
20653  if (exc_type) {
20654  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
20655  else __PYX_ERR(0, 923, __pyx_L1_error)
20656  }
20657  break;
20658  }
20659  __Pyx_GOTREF(__pyx_t_15);
20660  }
20661  __Pyx_XDECREF_SET(__pyx_v_cj, __pyx_t_15);
20662  __pyx_t_15 = 0;
20663 
20664  /* "ADR.pyx":924
20665  * if self.forceStrongConditions:
20666  * for cj in range(self.nc):
20667  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False) # <<<<<<<<<<<<<<
20668  * compKernelFlag = 0
20669  * self.adr = ADR(self.nSpace_global,
20670  */
20671  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_DOFBoundaryConditions); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 924, __pyx_L1_error)
20672  __Pyx_GOTREF(__pyx_t_15);
20673  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error)
20674  __Pyx_GOTREF(__pyx_t_2);
20675  __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_v_cj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
20676  __Pyx_GOTREF(__pyx_t_1);
20677  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20678  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error)
20679  __Pyx_GOTREF(__pyx_t_2);
20680  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20681  __pyx_t_1 = PyObject_GetItem(__pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_cj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
20682  __Pyx_GOTREF(__pyx_t_1);
20683  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error)
20684  __Pyx_GOTREF(__pyx_t_7);
20685  __Pyx_GIVEREF(__pyx_t_2);
20686  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
20687  __Pyx_GIVEREF(__pyx_t_1);
20688  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
20689  __pyx_t_2 = 0;
20690  __pyx_t_1 = 0;
20691  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
20692  __Pyx_GOTREF(__pyx_t_1);
20693  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_weakDirichletConditions, Py_False) < 0) __PYX_ERR(0, 924, __pyx_L1_error)
20694  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error)
20695  __Pyx_GOTREF(__pyx_t_2);
20696  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20697  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20698  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20699  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dirichletConditionsForceDOF); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
20700  __Pyx_GOTREF(__pyx_t_1);
20701  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_cj, __pyx_t_2) < 0)) __PYX_ERR(0, 924, __pyx_L1_error)
20702  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20703  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20704 
20705  /* "ADR.pyx":923
20706  * self.dirichletConditionsForceDOF = {}
20707  * if self.forceStrongConditions:
20708  * for cj in range(self.nc): # <<<<<<<<<<<<<<
20709  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20710  * compKernelFlag = 0
20711  */
20712  }
20713  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20714 
20715  /* "ADR.pyx":922
20716  * self.forceStrongConditions=coefficients.forceStrongDirichlet
20717  * self.dirichletConditionsForceDOF = {}
20718  * if self.forceStrongConditions: # <<<<<<<<<<<<<<
20719  * for cj in range(self.nc):
20720  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20721  */
20722  }
20723 
20724  /* "ADR.pyx":925
20725  * for cj in range(self.nc):
20726  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20727  * compKernelFlag = 0 # <<<<<<<<<<<<<<
20728  * self.adr = ADR(self.nSpace_global,
20729  * self.nQuadraturePoints_element,
20730  */
20731  __pyx_v_compKernelFlag = 0;
20732 
20733  /* "ADR.pyx":926
20734  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20735  * compKernelFlag = 0
20736  * self.adr = ADR(self.nSpace_global, # <<<<<<<<<<<<<<
20737  * self.nQuadraturePoints_element,
20738  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20739  */
20740  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 926, __pyx_L1_error)
20741  __Pyx_GOTREF(__pyx_t_21);
20742 
20743  /* "ADR.pyx":927
20744  * compKernelFlag = 0
20745  * self.adr = ADR(self.nSpace_global,
20746  * self.nQuadraturePoints_element, # <<<<<<<<<<<<<<
20747  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20748  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim,
20749  */
20750  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error)
20751  __Pyx_GOTREF(__pyx_t_2);
20752 
20753  /* "ADR.pyx":928
20754  * self.adr = ADR(self.nSpace_global,
20755  * self.nQuadraturePoints_element,
20756  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim, # <<<<<<<<<<<<<<
20757  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim,
20758  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim,
20759  */
20760  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)
20761  __Pyx_GOTREF(__pyx_t_1);
20762  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 928, __pyx_L1_error)
20763  __Pyx_GOTREF(__pyx_t_7);
20764  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20765  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)
20766  __Pyx_GOTREF(__pyx_t_1);
20767  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20768  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 928, __pyx_L1_error)
20769  __Pyx_GOTREF(__pyx_t_7);
20770  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20771  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_localFunctionSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)
20772  __Pyx_GOTREF(__pyx_t_1);
20773  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20774  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dim); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 928, __pyx_L1_error)
20775  __Pyx_GOTREF(__pyx_t_7);
20776  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20777 
20778  /* "ADR.pyx":929
20779  * self.nQuadraturePoints_element,
20780  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20781  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim, # <<<<<<<<<<<<<<
20782  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim,
20783  * self.nElementBoundaryQuadraturePoints_elementBoundary,
20784  */
20785  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error)
20786  __Pyx_GOTREF(__pyx_t_1);
20787  __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 929, __pyx_L1_error)
20788  __Pyx_GOTREF(__pyx_t_15);
20789  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20790  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error)
20791  __Pyx_GOTREF(__pyx_t_1);
20792  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20793  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_referenceFiniteElement); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 929, __pyx_L1_error)
20794  __Pyx_GOTREF(__pyx_t_15);
20795  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20796  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_localFunctionSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error)
20797  __Pyx_GOTREF(__pyx_t_1);
20798  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20799  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dim); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 929, __pyx_L1_error)
20800  __Pyx_GOTREF(__pyx_t_15);
20801  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20802 
20803  /* "ADR.pyx":930
20804  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20805  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim,
20806  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim, # <<<<<<<<<<<<<<
20807  * self.nElementBoundaryQuadraturePoints_elementBoundary,
20808  * compKernelFlag)
20809  */
20810  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_testSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
20811  __Pyx_GOTREF(__pyx_t_1);
20812  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 930, __pyx_L1_error)
20813  __Pyx_GOTREF(__pyx_t_8);
20814  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20815  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_referenceFiniteElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
20816  __Pyx_GOTREF(__pyx_t_1);
20817  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20818  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_localFunctionSpace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 930, __pyx_L1_error)
20819  __Pyx_GOTREF(__pyx_t_8);
20820  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20821  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
20822  __Pyx_GOTREF(__pyx_t_1);
20823  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20824 
20825  /* "ADR.pyx":931
20826  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim,
20827  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim,
20828  * self.nElementBoundaryQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
20829  * compKernelFlag)
20830  * #mwf these are getting called by redistancing classes,
20831  */
20832  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 931, __pyx_L1_error)
20833  __Pyx_GOTREF(__pyx_t_8);
20834 
20835  /* "ADR.pyx":932
20836  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim,
20837  * self.nElementBoundaryQuadraturePoints_elementBoundary,
20838  * compKernelFlag) # <<<<<<<<<<<<<<
20839  * #mwf these are getting called by redistancing classes,
20840  * def calculateCoefficients(self):
20841  */
20842  __pyx_t_22 = __Pyx_PyInt_From_long(__pyx_v_compKernelFlag); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 932, __pyx_L1_error)
20843  __Pyx_GOTREF(__pyx_t_22);
20844 
20845  /* "ADR.pyx":926
20846  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20847  * compKernelFlag = 0
20848  * self.adr = ADR(self.nSpace_global, # <<<<<<<<<<<<<<
20849  * self.nQuadraturePoints_element,
20850  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20851  */
20852  __pyx_t_26 = PyTuple_New(7); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 926, __pyx_L1_error)
20853  __Pyx_GOTREF(__pyx_t_26);
20854  __Pyx_GIVEREF(__pyx_t_21);
20855  PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_21);
20856  __Pyx_GIVEREF(__pyx_t_2);
20857  PyTuple_SET_ITEM(__pyx_t_26, 1, __pyx_t_2);
20858  __Pyx_GIVEREF(__pyx_t_7);
20859  PyTuple_SET_ITEM(__pyx_t_26, 2, __pyx_t_7);
20860  __Pyx_GIVEREF(__pyx_t_15);
20861  PyTuple_SET_ITEM(__pyx_t_26, 3, __pyx_t_15);
20862  __Pyx_GIVEREF(__pyx_t_1);
20863  PyTuple_SET_ITEM(__pyx_t_26, 4, __pyx_t_1);
20864  __Pyx_GIVEREF(__pyx_t_8);
20865  PyTuple_SET_ITEM(__pyx_t_26, 5, __pyx_t_8);
20866  __Pyx_GIVEREF(__pyx_t_22);
20867  PyTuple_SET_ITEM(__pyx_t_26, 6, __pyx_t_22);
20868  __pyx_t_21 = 0;
20869  __pyx_t_2 = 0;
20870  __pyx_t_7 = 0;
20871  __pyx_t_15 = 0;
20872  __pyx_t_1 = 0;
20873  __pyx_t_8 = 0;
20874  __pyx_t_22 = 0;
20875  __pyx_t_22 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3ADR_ADR), __pyx_t_26, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 926, __pyx_L1_error)
20876  __Pyx_GOTREF(__pyx_t_22);
20877  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
20878  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_adr, __pyx_t_22) < 0) __PYX_ERR(0, 926, __pyx_L1_error)
20879  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
20880 
20881  /* "ADR.pyx":571
20882  * """
20883  * nCalls=0
20884  * def __init__(self, # <<<<<<<<<<<<<<
20885  * uDict,
20886  * phiDict,
20887  */
20888 
20889  /* function exit code */
20890  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20891  goto __pyx_L0;
20892  __pyx_L1_error:;
20893  __Pyx_XDECREF(__pyx_t_1);
20894  __Pyx_XDECREF(__pyx_t_2);
20895  __Pyx_XDECREF(__pyx_t_6);
20896  __Pyx_XDECREF(__pyx_t_7);
20897  __Pyx_XDECREF(__pyx_t_8);
20898  __Pyx_XDECREF(__pyx_t_15);
20899  __Pyx_XDECREF(__pyx_t_21);
20900  __Pyx_XDECREF(__pyx_t_22);
20901  __Pyx_XDECREF(__pyx_t_26);
20902  __Pyx_AddTraceback("ADR.LevelModel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20903  __pyx_r = NULL;
20904  __pyx_L0:;
20905  __Pyx_XDECREF(__pyx_v_Comm);
20906  __Pyx_XDECREF(__pyx_v_ci);
20907  __Pyx_XDECREF(__pyx_v_flag);
20908  __Pyx_XDECREF(__pyx_v_diffusionDict);
20909  __Pyx_XDECREF(__pyx_v_elementQuadratureDict);
20910  __Pyx_XDECREF(__pyx_v_I);
20911  __Pyx_XDECREF(__pyx_v_elementBoundaryQuadratureDict);
20912  __Pyx_XDECREF(__pyx_v_cj);
20913  __Pyx_XDECREF(__pyx_v_ebNE);
20914  __Pyx_XDECREF(__pyx_v_ebN);
20915  __Pyx_XDECREF(__pyx_v_eN_global);
20916  __Pyx_XDECREF(__pyx_v_ebN_element);
20917  __Pyx_XDECREF(__pyx_v_i);
20918  __Pyx_XDECREF(__pyx_v_nI);
20919  __Pyx_XDECREF(__pyx_v_n);
20920  __Pyx_XDECREF(__pyx_v_comm);
20921  __Pyx_XDECREF(__pyx_v_k);
20922  __Pyx_XDECREF(__pyx_v_PostProcessingTools);
20923  __Pyx_XDECREF(__pyx_v_Archiver);
20924  __Pyx_XDECREF(__pyx_v_fbcObject);
20925  __Pyx_XDECREF(__pyx_v_t);
20926  __Pyx_XDECREF(__pyx_v_g);
20927  __Pyx_XDECREF(__pyx_v_ck);
20928  __Pyx_XDECREF(__pyx_v_diffusiveFluxBoundaryConditionsDict);
20929  __Pyx_XDECREF(__pyx_v_u_j);
20930  __Pyx_XDECREF(__pyx_v_phi_k);
20931  __Pyx_XDECREF(__pyx_v_femSpace);
20932  __Pyx_XDECREF(__pyx_v_dc);
20933  __Pyx_XGIVEREF(__pyx_r);
20934  __Pyx_RefNannyFinishContext();
20935  return __pyx_r;
20936 }
20937 
20938 /* "ADR.pyx":934
20939  * compKernelFlag)
20940  * #mwf these are getting called by redistancing classes,
20941  * def calculateCoefficients(self): # <<<<<<<<<<<<<<
20942  * pass
20943  * def getResidual(self,u,r):
20944  */
20945 
20946 /* Python wrapper */
20947 static PyObject *__pyx_pw_3ADR_10LevelModel_3calculateCoefficients(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
20948 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_3calculateCoefficients = {"calculateCoefficients", (PyCFunction)__pyx_pw_3ADR_10LevelModel_3calculateCoefficients, METH_O, 0};
20949 static PyObject *__pyx_pw_3ADR_10LevelModel_3calculateCoefficients(PyObject *__pyx_self, PyObject *__pyx_v_self) {
20950  PyObject *__pyx_r = 0;
20951  __Pyx_RefNannyDeclarations
20952  __Pyx_RefNannySetupContext("calculateCoefficients (wrapper)", 0);
20953  __pyx_r = __pyx_pf_3ADR_10LevelModel_2calculateCoefficients(__pyx_self, ((PyObject *)__pyx_v_self));
20954 
20955  /* function exit code */
20956  __Pyx_RefNannyFinishContext();
20957  return __pyx_r;
20958 }
20959 
20960 static PyObject *__pyx_pf_3ADR_10LevelModel_2calculateCoefficients(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
20961  PyObject *__pyx_r = NULL;
20962  __Pyx_RefNannyDeclarations
20963  __Pyx_RefNannySetupContext("calculateCoefficients", 0);
20964 
20965  /* function exit code */
20966  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20967  __Pyx_XGIVEREF(__pyx_r);
20968  __Pyx_RefNannyFinishContext();
20969  return __pyx_r;
20970 }
20971 
20972 /* "ADR.pyx":936
20973  * def calculateCoefficients(self):
20974  * pass
20975  * def getResidual(self,u,r): # <<<<<<<<<<<<<<
20976  * import pdb
20977  * import copy
20978  */
20979 
20980 /* Python wrapper */
20981 static PyObject *__pyx_pw_3ADR_10LevelModel_5getResidual(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20982 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_5getResidual = {"getResidual", (PyCFunction)__pyx_pw_3ADR_10LevelModel_5getResidual, METH_VARARGS|METH_KEYWORDS, 0};
20983 static PyObject *__pyx_pw_3ADR_10LevelModel_5getResidual(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20984  PyObject *__pyx_v_self = 0;
20985  PyObject *__pyx_v_u = 0;
20986  PyObject *__pyx_v_r = 0;
20987  PyObject *__pyx_r = 0;
20988  __Pyx_RefNannyDeclarations
20989  __Pyx_RefNannySetupContext("getResidual (wrapper)", 0);
20990  {
20991  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_u,&__pyx_n_s_r,0};
20992  PyObject* values[3] = {0,0,0};
20993  if (unlikely(__pyx_kwds)) {
20994  Py_ssize_t kw_args;
20995  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20996  switch (pos_args) {
20997  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20998  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20999  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21000  case 0: break;
21001  default: goto __pyx_L5_argtuple_error;
21002  }
21003  kw_args = PyDict_Size(__pyx_kwds);
21004  switch (pos_args) {
21005  case 0:
21006  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
21007  else goto __pyx_L5_argtuple_error;
21008  case 1:
21009  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
21010  else {
21011  __Pyx_RaiseArgtupleInvalid("getResidual", 1, 3, 3, 1); __PYX_ERR(0, 936, __pyx_L3_error)
21012  }
21013  case 2:
21014  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
21015  else {
21016  __Pyx_RaiseArgtupleInvalid("getResidual", 1, 3, 3, 2); __PYX_ERR(0, 936, __pyx_L3_error)
21017  }
21018  }
21019  if (unlikely(kw_args > 0)) {
21020  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getResidual") < 0)) __PYX_ERR(0, 936, __pyx_L3_error)
21021  }
21022  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
21023  goto __pyx_L5_argtuple_error;
21024  } else {
21025  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21026  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21027  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21028  }
21029  __pyx_v_self = values[0];
21030  __pyx_v_u = values[1];
21031  __pyx_v_r = values[2];
21032  }
21033  goto __pyx_L4_argument_unpacking_done;
21034  __pyx_L5_argtuple_error:;
21035  __Pyx_RaiseArgtupleInvalid("getResidual", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 936, __pyx_L3_error)
21036  __pyx_L3_error:;
21037  __Pyx_AddTraceback("ADR.LevelModel.getResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
21038  __Pyx_RefNannyFinishContext();
21039  return NULL;
21040  __pyx_L4_argument_unpacking_done:;
21041  __pyx_r = __pyx_pf_3ADR_10LevelModel_4getResidual(__pyx_self, __pyx_v_self, __pyx_v_u, __pyx_v_r);
21042 
21043  /* function exit code */
21044  __Pyx_RefNannyFinishContext();
21045  return __pyx_r;
21046 }
21047 
21048 static PyObject *__pyx_pf_3ADR_10LevelModel_4getResidual(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_u, PyObject *__pyx_v_r) {
21049  CYTHON_UNUSED PyObject *__pyx_v_pdb = NULL;
21050  CYTHON_UNUSED PyObject *__pyx_v_copy = NULL;
21051  PyObject *__pyx_v_globalSum = NULL;
21052  PyObject *__pyx_r = NULL;
21053  __Pyx_RefNannyDeclarations
21054  PyObject *__pyx_t_1 = NULL;
21055  PyObject *__pyx_t_2 = NULL;
21056  PyObject *__pyx_t_3 = NULL;
21057  PyObject *__pyx_t_4 = NULL;
21058  PyObject *__pyx_t_5 = NULL;
21059  PyObject *__pyx_t_6 = NULL;
21060  PyObject *__pyx_t_7 = NULL;
21061  PyObject *__pyx_t_8 = NULL;
21062  PyObject *__pyx_t_9 = NULL;
21063  PyObject *__pyx_t_10 = NULL;
21064  PyObject *__pyx_t_11 = NULL;
21065  PyObject *__pyx_t_12 = NULL;
21066  PyObject *__pyx_t_13 = NULL;
21067  PyObject *__pyx_t_14 = NULL;
21068  PyObject *__pyx_t_15 = NULL;
21069  PyObject *__pyx_t_16 = NULL;
21070  PyObject *__pyx_t_17 = NULL;
21071  PyObject *__pyx_t_18 = NULL;
21072  PyObject *__pyx_t_19 = NULL;
21073  PyObject *__pyx_t_20 = NULL;
21074  PyObject *__pyx_t_21 = NULL;
21075  PyObject *__pyx_t_22 = NULL;
21076  PyObject *__pyx_t_23 = NULL;
21077  PyObject *__pyx_t_24 = NULL;
21078  PyObject *__pyx_t_25 = NULL;
21079  PyObject *__pyx_t_26 = NULL;
21080  PyObject *__pyx_t_27 = NULL;
21081  PyObject *__pyx_t_28 = NULL;
21082  PyObject *__pyx_t_29 = NULL;
21083  PyObject *__pyx_t_30 = NULL;
21084  PyObject *__pyx_t_31 = NULL;
21085  PyObject *__pyx_t_32 = NULL;
21086  PyObject *__pyx_t_33 = NULL;
21087  PyObject *__pyx_t_34 = NULL;
21088  PyObject *__pyx_t_35 = NULL;
21089  PyObject *__pyx_t_36 = NULL;
21090  PyObject *__pyx_t_37 = NULL;
21091  PyObject *__pyx_t_38 = NULL;
21092  PyObject *__pyx_t_39 = NULL;
21093  PyObject *__pyx_t_40 = NULL;
21094  PyObject *__pyx_t_41 = NULL;
21095  PyObject *__pyx_t_42 = NULL;
21096  PyObject *__pyx_t_43 = NULL;
21097  PyObject *__pyx_t_44 = NULL;
21098  PyObject *__pyx_t_45 = NULL;
21099  PyObject *__pyx_t_46 = NULL;
21100  PyObject *__pyx_t_47 = NULL;
21101  PyObject *__pyx_t_48 = NULL;
21102  PyObject *__pyx_t_49 = NULL;
21103  PyObject *__pyx_t_50 = NULL;
21104  PyObject *__pyx_t_51 = NULL;
21105  PyObject *__pyx_t_52 = NULL;
21106  PyObject *__pyx_t_53 = NULL;
21107  PyObject *__pyx_t_54 = NULL;
21108  PyObject *__pyx_t_55 = NULL;
21109  int __pyx_t_56;
21110  PyObject *__pyx_t_57 = NULL;
21111  __Pyx_RefNannySetupContext("getResidual", 0);
21112 
21113  /* "ADR.pyx":937
21114  * pass
21115  * def getResidual(self,u,r):
21116  * import pdb # <<<<<<<<<<<<<<
21117  * import copy
21118  * from proteus.flcbdfWrappers import globalSum
21119  */
21120  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pdb, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L1_error)
21121  __Pyx_GOTREF(__pyx_t_1);
21122  __pyx_v_pdb = __pyx_t_1;
21123  __pyx_t_1 = 0;
21124 
21125  /* "ADR.pyx":938
21126  * def getResidual(self,u,r):
21127  * import pdb
21128  * import copy # <<<<<<<<<<<<<<
21129  * from proteus.flcbdfWrappers import globalSum
21130  * """
21131  */
21132  __pyx_t_1 = __Pyx_Import(__pyx_n_s_copy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
21133  __Pyx_GOTREF(__pyx_t_1);
21134  __pyx_v_copy = __pyx_t_1;
21135  __pyx_t_1 = 0;
21136 
21137  /* "ADR.pyx":939
21138  * import pdb
21139  * import copy
21140  * from proteus.flcbdfWrappers import globalSum # <<<<<<<<<<<<<<
21141  * """
21142  * Calculate the element residuals and add in to the global residual
21143  */
21144  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
21145  __Pyx_GOTREF(__pyx_t_1);
21146  __Pyx_INCREF(__pyx_n_s_globalSum);
21147  __Pyx_GIVEREF(__pyx_n_s_globalSum);
21148  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_globalSum);
21149  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_flcbdfWrappers, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error)
21150  __Pyx_GOTREF(__pyx_t_2);
21151  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21152  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_globalSum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
21153  __Pyx_GOTREF(__pyx_t_1);
21154  __Pyx_INCREF(__pyx_t_1);
21155  __pyx_v_globalSum = __pyx_t_1;
21156  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21157  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21158 
21159  /* "ADR.pyx":943
21160  * Calculate the element residuals and add in to the global residual
21161  * """
21162  * r.fill(0.0) # <<<<<<<<<<<<<<
21163  * #Load the unknowns into the finite element dof
21164  * self.setUnknowns(u)
21165  */
21166  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
21167  __Pyx_GOTREF(__pyx_t_2);
21168  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error)
21169  __Pyx_GOTREF(__pyx_t_1);
21170  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21171  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21172 
21173  /* "ADR.pyx":945
21174  * r.fill(0.0)
21175  * #Load the unknowns into the finite element dof
21176  * self.setUnknowns(u) # <<<<<<<<<<<<<<
21177  *
21178  *
21179  */
21180  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_setUnknowns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
21181  __Pyx_GOTREF(__pyx_t_2);
21182  __pyx_t_3 = NULL;
21183  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
21184  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
21185  if (likely(__pyx_t_3)) {
21186  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21187  __Pyx_INCREF(__pyx_t_3);
21188  __Pyx_INCREF(function);
21189  __Pyx_DECREF_SET(__pyx_t_2, function);
21190  }
21191  }
21192  if (!__pyx_t_3) {
21193  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_u); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
21194  __Pyx_GOTREF(__pyx_t_1);
21195  } else {
21196  #if CYTHON_FAST_PYCALL
21197  if (PyFunction_Check(__pyx_t_2)) {
21198  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_u};
21199  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
21200  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21201  __Pyx_GOTREF(__pyx_t_1);
21202  } else
21203  #endif
21204  #if CYTHON_FAST_PYCCALL
21205  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
21206  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_u};
21207  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
21208  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21209  __Pyx_GOTREF(__pyx_t_1);
21210  } else
21211  #endif
21212  {
21213  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L1_error)
21214  __Pyx_GOTREF(__pyx_t_4);
21215  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
21216  __Pyx_INCREF(__pyx_v_u);
21217  __Pyx_GIVEREF(__pyx_v_u);
21218  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_u);
21219  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
21220  __Pyx_GOTREF(__pyx_t_1);
21221  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21222  }
21223  }
21224  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21225  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21226 
21227  /* "ADR.pyx":949
21228  *
21229  * #no flux boundary conditions
21230  * self.adr.calculateResidual(#element # <<<<<<<<<<<<<<
21231  * self.u[0].femSpace.elementMaps.psi,
21232  * self.u[0].femSpace.elementMaps.grad_psi,
21233  */
21234  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_adr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
21235  __Pyx_GOTREF(__pyx_t_2);
21236  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_calculateResidual); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 949, __pyx_L1_error)
21237  __Pyx_GOTREF(__pyx_t_4);
21238  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21239 
21240  /* "ADR.pyx":950
21241  * #no flux boundary conditions
21242  * self.adr.calculateResidual(#element
21243  * self.u[0].femSpace.elementMaps.psi, # <<<<<<<<<<<<<<
21244  * self.u[0].femSpace.elementMaps.grad_psi,
21245  * self.mesh.nodeArray,
21246  */
21247  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
21248  __Pyx_GOTREF(__pyx_t_2);
21249  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L1_error)
21250  __Pyx_GOTREF(__pyx_t_3);
21251  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21252  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
21253  __Pyx_GOTREF(__pyx_t_2);
21254  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21255  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L1_error)
21256  __Pyx_GOTREF(__pyx_t_3);
21257  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21258  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_psi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
21259  __Pyx_GOTREF(__pyx_t_2);
21260  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21261 
21262  /* "ADR.pyx":951
21263  * self.adr.calculateResidual(#element
21264  * self.u[0].femSpace.elementMaps.psi,
21265  * self.u[0].femSpace.elementMaps.grad_psi, # <<<<<<<<<<<<<<
21266  * self.mesh.nodeArray,
21267  * self.mesh.elementNodesArray,
21268  */
21269  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
21270  __Pyx_GOTREF(__pyx_t_3);
21271  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 951, __pyx_L1_error)
21272  __Pyx_GOTREF(__pyx_t_5);
21273  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21274  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
21275  __Pyx_GOTREF(__pyx_t_3);
21276  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21277  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 951, __pyx_L1_error)
21278  __Pyx_GOTREF(__pyx_t_5);
21279  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21280  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
21281  __Pyx_GOTREF(__pyx_t_3);
21282  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21283 
21284  /* "ADR.pyx":952
21285  * self.u[0].femSpace.elementMaps.psi,
21286  * self.u[0].femSpace.elementMaps.grad_psi,
21287  * self.mesh.nodeArray, # <<<<<<<<<<<<<<
21288  * self.mesh.elementNodesArray,
21289  * self.elementQuadratureWeights[('u',0)],
21290  */
21291  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error)
21292  __Pyx_GOTREF(__pyx_t_5);
21293  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 952, __pyx_L1_error)
21294  __Pyx_GOTREF(__pyx_t_6);
21295  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21296 
21297  /* "ADR.pyx":953
21298  * self.u[0].femSpace.elementMaps.grad_psi,
21299  * self.mesh.nodeArray,
21300  * self.mesh.elementNodesArray, # <<<<<<<<<<<<<<
21301  * self.elementQuadratureWeights[('u',0)],
21302  * self.u[0].femSpace.psi,
21303  */
21304  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error)
21305  __Pyx_GOTREF(__pyx_t_5);
21306  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 953, __pyx_L1_error)
21307  __Pyx_GOTREF(__pyx_t_7);
21308  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21309 
21310  /* "ADR.pyx":954
21311  * self.mesh.nodeArray,
21312  * self.mesh.elementNodesArray,
21313  * self.elementQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
21314  * self.u[0].femSpace.psi,
21315  * self.u[0].femSpace.grad_psi,
21316  */
21317  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureWeights); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 954, __pyx_L1_error)
21318  __Pyx_GOTREF(__pyx_t_5);
21319  __pyx_t_8 = PyObject_GetItem(__pyx_t_5, __pyx_tuple__57); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 954, __pyx_L1_error)
21320  __Pyx_GOTREF(__pyx_t_8);
21321  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21322 
21323  /* "ADR.pyx":955
21324  * self.mesh.elementNodesArray,
21325  * self.elementQuadratureWeights[('u',0)],
21326  * self.u[0].femSpace.psi, # <<<<<<<<<<<<<<
21327  * self.u[0].femSpace.grad_psi,
21328  * self.u[0].femSpace.psi,
21329  */
21330  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error)
21331  __Pyx_GOTREF(__pyx_t_5);
21332  __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 955, __pyx_L1_error)
21333  __Pyx_GOTREF(__pyx_t_9);
21334  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21335  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error)
21336  __Pyx_GOTREF(__pyx_t_5);
21337  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21338  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_psi); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 955, __pyx_L1_error)
21339  __Pyx_GOTREF(__pyx_t_9);
21340  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21341 
21342  /* "ADR.pyx":956
21343  * self.elementQuadratureWeights[('u',0)],
21344  * self.u[0].femSpace.psi,
21345  * self.u[0].femSpace.grad_psi, # <<<<<<<<<<<<<<
21346  * self.u[0].femSpace.psi,
21347  * self.u[0].femSpace.grad_psi,
21348  */
21349  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 956, __pyx_L1_error)
21350  __Pyx_GOTREF(__pyx_t_5);
21351  __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 956, __pyx_L1_error)
21352  __Pyx_GOTREF(__pyx_t_10);
21353  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21354  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 956, __pyx_L1_error)
21355  __Pyx_GOTREF(__pyx_t_5);
21356  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21357  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 956, __pyx_L1_error)
21358  __Pyx_GOTREF(__pyx_t_10);
21359  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21360 
21361  /* "ADR.pyx":957
21362  * self.u[0].femSpace.psi,
21363  * self.u[0].femSpace.grad_psi,
21364  * self.u[0].femSpace.psi, # <<<<<<<<<<<<<<
21365  * self.u[0].femSpace.grad_psi,
21366  * self.mesh.elementDiametersArray,
21367  */
21368  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 957, __pyx_L1_error)
21369  __Pyx_GOTREF(__pyx_t_5);
21370  __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 957, __pyx_L1_error)
21371  __Pyx_GOTREF(__pyx_t_11);
21372  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21373  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 957, __pyx_L1_error)
21374  __Pyx_GOTREF(__pyx_t_5);
21375  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
21376  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_psi); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 957, __pyx_L1_error)
21377  __Pyx_GOTREF(__pyx_t_11);
21378  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21379 
21380  /* "ADR.pyx":958
21381  * self.u[0].femSpace.grad_psi,
21382  * self.u[0].femSpace.psi,
21383  * self.u[0].femSpace.grad_psi, # <<<<<<<<<<<<<<
21384  * self.mesh.elementDiametersArray,
21385  * self.q[('cfl',0)],
21386  */
21387  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error)
21388  __Pyx_GOTREF(__pyx_t_5);
21389  __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 958, __pyx_L1_error)
21390  __Pyx_GOTREF(__pyx_t_12);
21391  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21392  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error)
21393  __Pyx_GOTREF(__pyx_t_5);
21394  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
21395  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 958, __pyx_L1_error)
21396  __Pyx_GOTREF(__pyx_t_12);
21397  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21398 
21399  /* "ADR.pyx":959
21400  * self.u[0].femSpace.psi,
21401  * self.u[0].femSpace.grad_psi,
21402  * self.mesh.elementDiametersArray, # <<<<<<<<<<<<<<
21403  * self.q[('cfl',0)],
21404  * self.shockCapturing.shockCapturingFactor,
21405  */
21406  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 959, __pyx_L1_error)
21407  __Pyx_GOTREF(__pyx_t_5);
21408  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_elementDiametersArray); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 959, __pyx_L1_error)
21409  __Pyx_GOTREF(__pyx_t_13);
21410  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21411 
21412  /* "ADR.pyx":960
21413  * self.u[0].femSpace.grad_psi,
21414  * self.mesh.elementDiametersArray,
21415  * self.q[('cfl',0)], # <<<<<<<<<<<<<<
21416  * self.shockCapturing.shockCapturingFactor,
21417  * self.coefficients.sc_uref,
21418  */
21419  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 960, __pyx_L1_error)
21420  __Pyx_GOTREF(__pyx_t_5);
21421  __pyx_t_14 = PyObject_GetItem(__pyx_t_5, __pyx_tuple__58); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 960, __pyx_L1_error)
21422  __Pyx_GOTREF(__pyx_t_14);
21423  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21424 
21425  /* "ADR.pyx":961
21426  * self.mesh.elementDiametersArray,
21427  * self.q[('cfl',0)],
21428  * self.shockCapturing.shockCapturingFactor, # <<<<<<<<<<<<<<
21429  * self.coefficients.sc_uref,
21430  * self.coefficients.sc_beta,
21431  */
21432  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L1_error)
21433  __Pyx_GOTREF(__pyx_t_5);
21434  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shockCapturingFactor); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 961, __pyx_L1_error)
21435  __Pyx_GOTREF(__pyx_t_15);
21436  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21437 
21438  /* "ADR.pyx":962
21439  * self.q[('cfl',0)],
21440  * self.shockCapturing.shockCapturingFactor,
21441  * self.coefficients.sc_uref, # <<<<<<<<<<<<<<
21442  * self.coefficients.sc_beta,
21443  * self.coefficients.useMetrics,
21444  */
21445  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L1_error)
21446  __Pyx_GOTREF(__pyx_t_5);
21447  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sc_uref); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 962, __pyx_L1_error)
21448  __Pyx_GOTREF(__pyx_t_16);
21449  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21450 
21451  /* "ADR.pyx":963
21452  * self.shockCapturing.shockCapturingFactor,
21453  * self.coefficients.sc_uref,
21454  * self.coefficients.sc_beta, # <<<<<<<<<<<<<<
21455  * self.coefficients.useMetrics,
21456  * #element boundary
21457  */
21458  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 963, __pyx_L1_error)
21459  __Pyx_GOTREF(__pyx_t_5);
21460  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sc_beta); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 963, __pyx_L1_error)
21461  __Pyx_GOTREF(__pyx_t_17);
21462  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21463 
21464  /* "ADR.pyx":964
21465  * self.coefficients.sc_uref,
21466  * self.coefficients.sc_beta,
21467  * self.coefficients.useMetrics, # <<<<<<<<<<<<<<
21468  * #element boundary
21469  * self.u[0].femSpace.elementMaps.psi_trace,
21470  */
21471  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error)
21472  __Pyx_GOTREF(__pyx_t_5);
21473  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_useMetrics); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 964, __pyx_L1_error)
21474  __Pyx_GOTREF(__pyx_t_18);
21475  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21476 
21477  /* "ADR.pyx":966
21478  * self.coefficients.useMetrics,
21479  * #element boundary
21480  * self.u[0].femSpace.elementMaps.psi_trace, # <<<<<<<<<<<<<<
21481  * self.u[0].femSpace.elementMaps.grad_psi_trace,
21482  * self.elementBoundaryQuadratureWeights[('u',0)],
21483  */
21484  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __pyx_L1_error)
21485  __Pyx_GOTREF(__pyx_t_5);
21486  __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 966, __pyx_L1_error)
21487  __Pyx_GOTREF(__pyx_t_19);
21488  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21489  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __pyx_L1_error)
21490  __Pyx_GOTREF(__pyx_t_5);
21491  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21492  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 966, __pyx_L1_error)
21493  __Pyx_GOTREF(__pyx_t_19);
21494  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21495  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __pyx_L1_error)
21496  __Pyx_GOTREF(__pyx_t_5);
21497  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21498 
21499  /* "ADR.pyx":967
21500  * #element boundary
21501  * self.u[0].femSpace.elementMaps.psi_trace,
21502  * self.u[0].femSpace.elementMaps.grad_psi_trace, # <<<<<<<<<<<<<<
21503  * self.elementBoundaryQuadratureWeights[('u',0)],
21504  * self.u[0].femSpace.psi_trace,
21505  */
21506  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 967, __pyx_L1_error)
21507  __Pyx_GOTREF(__pyx_t_19);
21508  __pyx_t_20 = __Pyx_GetItemInt(__pyx_t_19, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 967, __pyx_L1_error)
21509  __Pyx_GOTREF(__pyx_t_20);
21510  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21511  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 967, __pyx_L1_error)
21512  __Pyx_GOTREF(__pyx_t_19);
21513  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21514  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 967, __pyx_L1_error)
21515  __Pyx_GOTREF(__pyx_t_20);
21516  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21517  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 967, __pyx_L1_error)
21518  __Pyx_GOTREF(__pyx_t_19);
21519  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21520 
21521  /* "ADR.pyx":968
21522  * self.u[0].femSpace.elementMaps.psi_trace,
21523  * self.u[0].femSpace.elementMaps.grad_psi_trace,
21524  * self.elementBoundaryQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
21525  * self.u[0].femSpace.psi_trace,
21526  * self.u[0].femSpace.grad_psi_trace,
21527  */
21528  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureWeights); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 968, __pyx_L1_error)
21529  __Pyx_GOTREF(__pyx_t_20);
21530  __pyx_t_21 = PyObject_GetItem(__pyx_t_20, __pyx_tuple__59); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 968, __pyx_L1_error)
21531  __Pyx_GOTREF(__pyx_t_21);
21532  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21533 
21534  /* "ADR.pyx":969
21535  * self.u[0].femSpace.elementMaps.grad_psi_trace,
21536  * self.elementBoundaryQuadratureWeights[('u',0)],
21537  * self.u[0].femSpace.psi_trace, # <<<<<<<<<<<<<<
21538  * self.u[0].femSpace.grad_psi_trace,
21539  * self.u[0].femSpace.psi_trace,
21540  */
21541  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 969, __pyx_L1_error)
21542  __Pyx_GOTREF(__pyx_t_20);
21543  __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 969, __pyx_L1_error)
21544  __Pyx_GOTREF(__pyx_t_22);
21545  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21546  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 969, __pyx_L1_error)
21547  __Pyx_GOTREF(__pyx_t_20);
21548  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
21549  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 969, __pyx_L1_error)
21550  __Pyx_GOTREF(__pyx_t_22);
21551  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21552 
21553  /* "ADR.pyx":970
21554  * self.elementBoundaryQuadratureWeights[('u',0)],
21555  * self.u[0].femSpace.psi_trace,
21556  * self.u[0].femSpace.grad_psi_trace, # <<<<<<<<<<<<<<
21557  * self.u[0].femSpace.psi_trace,
21558  * self.u[0].femSpace.grad_psi_trace,
21559  */
21560  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 970, __pyx_L1_error)
21561  __Pyx_GOTREF(__pyx_t_20);
21562  __pyx_t_23 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 970, __pyx_L1_error)
21563  __Pyx_GOTREF(__pyx_t_23);
21564  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21565  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 970, __pyx_L1_error)
21566  __Pyx_GOTREF(__pyx_t_20);
21567  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
21568  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 970, __pyx_L1_error)
21569  __Pyx_GOTREF(__pyx_t_23);
21570  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21571 
21572  /* "ADR.pyx":971
21573  * self.u[0].femSpace.psi_trace,
21574  * self.u[0].femSpace.grad_psi_trace,
21575  * self.u[0].femSpace.psi_trace, # <<<<<<<<<<<<<<
21576  * self.u[0].femSpace.grad_psi_trace,
21577  * self.u[0].femSpace.elementMaps.boundaryNormals,
21578  */
21579  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 971, __pyx_L1_error)
21580  __Pyx_GOTREF(__pyx_t_20);
21581  __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 971, __pyx_L1_error)
21582  __Pyx_GOTREF(__pyx_t_24);
21583  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21584  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 971, __pyx_L1_error)
21585  __Pyx_GOTREF(__pyx_t_20);
21586  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
21587  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 971, __pyx_L1_error)
21588  __Pyx_GOTREF(__pyx_t_24);
21589  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21590 
21591  /* "ADR.pyx":972
21592  * self.u[0].femSpace.grad_psi_trace,
21593  * self.u[0].femSpace.psi_trace,
21594  * self.u[0].femSpace.grad_psi_trace, # <<<<<<<<<<<<<<
21595  * self.u[0].femSpace.elementMaps.boundaryNormals,
21596  * self.u[0].femSpace.elementMaps.boundaryJacobians,
21597  */
21598  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 972, __pyx_L1_error)
21599  __Pyx_GOTREF(__pyx_t_20);
21600  __pyx_t_25 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 972, __pyx_L1_error)
21601  __Pyx_GOTREF(__pyx_t_25);
21602  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21603  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 972, __pyx_L1_error)
21604  __Pyx_GOTREF(__pyx_t_20);
21605  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
21606  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 972, __pyx_L1_error)
21607  __Pyx_GOTREF(__pyx_t_25);
21608  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21609 
21610  /* "ADR.pyx":973
21611  * self.u[0].femSpace.psi_trace,
21612  * self.u[0].femSpace.grad_psi_trace,
21613  * self.u[0].femSpace.elementMaps.boundaryNormals, # <<<<<<<<<<<<<<
21614  * self.u[0].femSpace.elementMaps.boundaryJacobians,
21615  * #physics
21616  */
21617  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 973, __pyx_L1_error)
21618  __Pyx_GOTREF(__pyx_t_20);
21619  __pyx_t_26 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 973, __pyx_L1_error)
21620  __Pyx_GOTREF(__pyx_t_26);
21621  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21622  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 973, __pyx_L1_error)
21623  __Pyx_GOTREF(__pyx_t_20);
21624  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21625  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 973, __pyx_L1_error)
21626  __Pyx_GOTREF(__pyx_t_26);
21627  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21628  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_boundaryNormals); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 973, __pyx_L1_error)
21629  __Pyx_GOTREF(__pyx_t_20);
21630  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21631 
21632  /* "ADR.pyx":974
21633  * self.u[0].femSpace.grad_psi_trace,
21634  * self.u[0].femSpace.elementMaps.boundaryNormals,
21635  * self.u[0].femSpace.elementMaps.boundaryJacobians, # <<<<<<<<<<<<<<
21636  * #physics
21637  * self.mesh.nElements_global,
21638  */
21639  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 974, __pyx_L1_error)
21640  __Pyx_GOTREF(__pyx_t_26);
21641  __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_26, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 974, __pyx_L1_error)
21642  __Pyx_GOTREF(__pyx_t_27);
21643  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21644  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 974, __pyx_L1_error)
21645  __Pyx_GOTREF(__pyx_t_26);
21646  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21647  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 974, __pyx_L1_error)
21648  __Pyx_GOTREF(__pyx_t_27);
21649  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21650  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_boundaryJacobians); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 974, __pyx_L1_error)
21651  __Pyx_GOTREF(__pyx_t_26);
21652  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21653 
21654  /* "ADR.pyx":976
21655  * self.u[0].femSpace.elementMaps.boundaryJacobians,
21656  * #physics
21657  * self.mesh.nElements_global, # <<<<<<<<<<<<<<
21658  * self.u[0].femSpace.dofMap.l2g,
21659  * self.u[0].dof,
21660  */
21661  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 976, __pyx_L1_error)
21662  __Pyx_GOTREF(__pyx_t_27);
21663  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 976, __pyx_L1_error)
21664  __Pyx_GOTREF(__pyx_t_28);
21665  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21666 
21667  /* "ADR.pyx":977
21668  * #physics
21669  * self.mesh.nElements_global,
21670  * self.u[0].femSpace.dofMap.l2g, # <<<<<<<<<<<<<<
21671  * self.u[0].dof,
21672  * self.coefficients.sdInfo[(0,0)][0],
21673  */
21674  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 977, __pyx_L1_error)
21675  __Pyx_GOTREF(__pyx_t_27);
21676  __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_27, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 977, __pyx_L1_error)
21677  __Pyx_GOTREF(__pyx_t_29);
21678  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21679  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_29, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 977, __pyx_L1_error)
21680  __Pyx_GOTREF(__pyx_t_27);
21681  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
21682  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_dofMap); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 977, __pyx_L1_error)
21683  __Pyx_GOTREF(__pyx_t_29);
21684  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21685  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_29, __pyx_n_s_l2g); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 977, __pyx_L1_error)
21686  __Pyx_GOTREF(__pyx_t_27);
21687  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
21688 
21689  /* "ADR.pyx":978
21690  * self.mesh.nElements_global,
21691  * self.u[0].femSpace.dofMap.l2g,
21692  * self.u[0].dof, # <<<<<<<<<<<<<<
21693  * self.coefficients.sdInfo[(0,0)][0],
21694  * self.coefficients.sdInfo[(0,0)][1],
21695  */
21696  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 978, __pyx_L1_error)
21697  __Pyx_GOTREF(__pyx_t_29);
21698  __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_29, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 978, __pyx_L1_error)
21699  __Pyx_GOTREF(__pyx_t_30);
21700  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
21701  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_dof); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 978, __pyx_L1_error)
21702  __Pyx_GOTREF(__pyx_t_29);
21703  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21704 
21705  /* "ADR.pyx":979
21706  * self.u[0].femSpace.dofMap.l2g,
21707  * self.u[0].dof,
21708  * self.coefficients.sdInfo[(0,0)][0], # <<<<<<<<<<<<<<
21709  * self.coefficients.sdInfo[(0,0)][1],
21710  * self.q[('a',0,0)],
21711  */
21712  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 979, __pyx_L1_error)
21713  __Pyx_GOTREF(__pyx_t_30);
21714  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 979, __pyx_L1_error)
21715  __Pyx_GOTREF(__pyx_t_31);
21716  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21717  __pyx_t_30 = PyObject_GetItem(__pyx_t_31, __pyx_tuple__60); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 979, __pyx_L1_error)
21718  __Pyx_GOTREF(__pyx_t_30);
21719  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
21720  __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_30, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 979, __pyx_L1_error)
21721  __Pyx_GOTREF(__pyx_t_31);
21722  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21723 
21724  /* "ADR.pyx":980
21725  * self.u[0].dof,
21726  * self.coefficients.sdInfo[(0,0)][0],
21727  * self.coefficients.sdInfo[(0,0)][1], # <<<<<<<<<<<<<<
21728  * self.q[('a',0,0)],
21729  * self.q[('df',0,0)],
21730  */
21731  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 980, __pyx_L1_error)
21732  __Pyx_GOTREF(__pyx_t_30);
21733  __pyx_t_32 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 980, __pyx_L1_error)
21734  __Pyx_GOTREF(__pyx_t_32);
21735  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21736  __pyx_t_30 = PyObject_GetItem(__pyx_t_32, __pyx_tuple__61); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 980, __pyx_L1_error)
21737  __Pyx_GOTREF(__pyx_t_30);
21738  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
21739  __pyx_t_32 = __Pyx_GetItemInt(__pyx_t_30, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 980, __pyx_L1_error)
21740  __Pyx_GOTREF(__pyx_t_32);
21741  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21742 
21743  /* "ADR.pyx":981
21744  * self.coefficients.sdInfo[(0,0)][0],
21745  * self.coefficients.sdInfo[(0,0)][1],
21746  * self.q[('a',0,0)], # <<<<<<<<<<<<<<
21747  * self.q[('df',0,0)],
21748  * self.q[('r',0)],
21749  */
21750  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 981, __pyx_L1_error)
21751  __Pyx_GOTREF(__pyx_t_30);
21752  __pyx_t_33 = PyObject_GetItem(__pyx_t_30, __pyx_tuple__62); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 981, __pyx_L1_error)
21753  __Pyx_GOTREF(__pyx_t_33);
21754  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21755 
21756  /* "ADR.pyx":982
21757  * self.coefficients.sdInfo[(0,0)][1],
21758  * self.q[('a',0,0)],
21759  * self.q[('df',0,0)], # <<<<<<<<<<<<<<
21760  * self.q[('r',0)],
21761  * self.shockCapturing.lag,
21762  */
21763  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 982, __pyx_L1_error)
21764  __Pyx_GOTREF(__pyx_t_30);
21765  __pyx_t_34 = PyObject_GetItem(__pyx_t_30, __pyx_tuple__63); if (unlikely(!__pyx_t_34)) __PYX_ERR(0, 982, __pyx_L1_error)
21766  __Pyx_GOTREF(__pyx_t_34);
21767  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21768 
21769  /* "ADR.pyx":983
21770  * self.q[('a',0,0)],
21771  * self.q[('df',0,0)],
21772  * self.q[('r',0)], # <<<<<<<<<<<<<<
21773  * self.shockCapturing.lag,
21774  * self.shockCapturing.shockCapturingFactor,
21775  */
21776  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 983, __pyx_L1_error)
21777  __Pyx_GOTREF(__pyx_t_30);
21778  __pyx_t_35 = PyObject_GetItem(__pyx_t_30, __pyx_tuple__64); if (unlikely(!__pyx_t_35)) __PYX_ERR(0, 983, __pyx_L1_error)
21779  __Pyx_GOTREF(__pyx_t_35);
21780  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21781 
21782  /* "ADR.pyx":984
21783  * self.q[('df',0,0)],
21784  * self.q[('r',0)],
21785  * self.shockCapturing.lag, # <<<<<<<<<<<<<<
21786  * self.shockCapturing.shockCapturingFactor,
21787  * self.shockCapturing.numDiff[0],
21788  */
21789  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 984, __pyx_L1_error)
21790  __Pyx_GOTREF(__pyx_t_30);
21791  __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_lag); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 984, __pyx_L1_error)
21792  __Pyx_GOTREF(__pyx_t_36);
21793  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21794 
21795  /* "ADR.pyx":985
21796  * self.q[('r',0)],
21797  * self.shockCapturing.lag,
21798  * self.shockCapturing.shockCapturingFactor, # <<<<<<<<<<<<<<
21799  * self.shockCapturing.numDiff[0],
21800  * self.shockCapturing.numDiff_last[0],
21801  */
21802  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 985, __pyx_L1_error)
21803  __Pyx_GOTREF(__pyx_t_30);
21804  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_shockCapturingFactor); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 985, __pyx_L1_error)
21805  __Pyx_GOTREF(__pyx_t_37);
21806  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21807 
21808  /* "ADR.pyx":986
21809  * self.shockCapturing.lag,
21810  * self.shockCapturing.shockCapturingFactor,
21811  * self.shockCapturing.numDiff[0], # <<<<<<<<<<<<<<
21812  * self.shockCapturing.numDiff_last[0],
21813  * self.offset[0],
21814  */
21815  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 986, __pyx_L1_error)
21816  __Pyx_GOTREF(__pyx_t_30);
21817  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_38)) __PYX_ERR(0, 986, __pyx_L1_error)
21818  __Pyx_GOTREF(__pyx_t_38);
21819  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21820  __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_38, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 986, __pyx_L1_error)
21821  __Pyx_GOTREF(__pyx_t_30);
21822  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
21823 
21824  /* "ADR.pyx":987
21825  * self.shockCapturing.shockCapturingFactor,
21826  * self.shockCapturing.numDiff[0],
21827  * self.shockCapturing.numDiff_last[0], # <<<<<<<<<<<<<<
21828  * self.offset[0],
21829  * self.stride[0],
21830  */
21831  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_38)) __PYX_ERR(0, 987, __pyx_L1_error)
21832  __Pyx_GOTREF(__pyx_t_38);
21833  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_t_38, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 987, __pyx_L1_error)
21834  __Pyx_GOTREF(__pyx_t_39);
21835  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
21836  __pyx_t_38 = __Pyx_GetItemInt(__pyx_t_39, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_38)) __PYX_ERR(0, 987, __pyx_L1_error)
21837  __Pyx_GOTREF(__pyx_t_38);
21838  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21839 
21840  /* "ADR.pyx":988
21841  * self.shockCapturing.numDiff[0],
21842  * self.shockCapturing.numDiff_last[0],
21843  * self.offset[0], # <<<<<<<<<<<<<<
21844  * self.stride[0],
21845  * r,
21846  */
21847  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 988, __pyx_L1_error)
21848  __Pyx_GOTREF(__pyx_t_39);
21849  __pyx_t_40 = __Pyx_GetItemInt(__pyx_t_39, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 988, __pyx_L1_error)
21850  __Pyx_GOTREF(__pyx_t_40);
21851  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21852 
21853  /* "ADR.pyx":989
21854  * self.shockCapturing.numDiff_last[0],
21855  * self.offset[0],
21856  * self.stride[0], # <<<<<<<<<<<<<<
21857  * r,
21858  * self.mesh.nExteriorElementBoundaries_global,
21859  */
21860  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stride); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 989, __pyx_L1_error)
21861  __Pyx_GOTREF(__pyx_t_39);
21862  __pyx_t_41 = __Pyx_GetItemInt(__pyx_t_39, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 989, __pyx_L1_error)
21863  __Pyx_GOTREF(__pyx_t_41);
21864  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21865 
21866  /* "ADR.pyx":991
21867  * self.stride[0],
21868  * r,
21869  * self.mesh.nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
21870  * self.mesh.exteriorElementBoundariesArray,
21871  * self.mesh.elementBoundaryElementsArray,
21872  */
21873  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 991, __pyx_L1_error)
21874  __Pyx_GOTREF(__pyx_t_39);
21875  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 991, __pyx_L1_error)
21876  __Pyx_GOTREF(__pyx_t_42);
21877  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21878 
21879  /* "ADR.pyx":992
21880  * r,
21881  * self.mesh.nExteriorElementBoundaries_global,
21882  * self.mesh.exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
21883  * self.mesh.elementBoundaryElementsArray,
21884  * self.mesh.elementBoundaryLocalElementBoundariesArray,
21885  */
21886  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 992, __pyx_L1_error)
21887  __Pyx_GOTREF(__pyx_t_39);
21888  __pyx_t_43 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 992, __pyx_L1_error)
21889  __Pyx_GOTREF(__pyx_t_43);
21890  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21891 
21892  /* "ADR.pyx":993
21893  * self.mesh.nExteriorElementBoundaries_global,
21894  * self.mesh.exteriorElementBoundariesArray,
21895  * self.mesh.elementBoundaryElementsArray, # <<<<<<<<<<<<<<
21896  * self.mesh.elementBoundaryLocalElementBoundariesArray,
21897  * self.ebqe[('a',0,0)],
21898  */
21899  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 993, __pyx_L1_error)
21900  __Pyx_GOTREF(__pyx_t_39);
21901  __pyx_t_44 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_elementBoundaryElementsArray); if (unlikely(!__pyx_t_44)) __PYX_ERR(0, 993, __pyx_L1_error)
21902  __Pyx_GOTREF(__pyx_t_44);
21903  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21904 
21905  /* "ADR.pyx":994
21906  * self.mesh.exteriorElementBoundariesArray,
21907  * self.mesh.elementBoundaryElementsArray,
21908  * self.mesh.elementBoundaryLocalElementBoundariesArray, # <<<<<<<<<<<<<<
21909  * self.ebqe[('a',0,0)],
21910  * self.ebqe[('df',0,0)],
21911  */
21912  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 994, __pyx_L1_error)
21913  __Pyx_GOTREF(__pyx_t_39);
21914  __pyx_t_45 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_elementBoundaryLocalElementBound); if (unlikely(!__pyx_t_45)) __PYX_ERR(0, 994, __pyx_L1_error)
21915  __Pyx_GOTREF(__pyx_t_45);
21916  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21917 
21918  /* "ADR.pyx":995
21919  * self.mesh.elementBoundaryElementsArray,
21920  * self.mesh.elementBoundaryLocalElementBoundariesArray,
21921  * self.ebqe[('a',0,0)], # <<<<<<<<<<<<<<
21922  * self.ebqe[('df',0,0)],
21923  * self.numericalFlux.isDOFBoundary[0],
21924  */
21925  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 995, __pyx_L1_error)
21926  __Pyx_GOTREF(__pyx_t_39);
21927  __pyx_t_46 = PyObject_GetItem(__pyx_t_39, __pyx_tuple__65); if (unlikely(!__pyx_t_46)) __PYX_ERR(0, 995, __pyx_L1_error)
21928  __Pyx_GOTREF(__pyx_t_46);
21929  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21930 
21931  /* "ADR.pyx":996
21932  * self.mesh.elementBoundaryLocalElementBoundariesArray,
21933  * self.ebqe[('a',0,0)],
21934  * self.ebqe[('df',0,0)], # <<<<<<<<<<<<<<
21935  * self.numericalFlux.isDOFBoundary[0],
21936  * self.numericalFlux.ebqe[('u',0)],
21937  */
21938  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 996, __pyx_L1_error)
21939  __Pyx_GOTREF(__pyx_t_39);
21940  __pyx_t_47 = PyObject_GetItem(__pyx_t_39, __pyx_tuple__66); if (unlikely(!__pyx_t_47)) __PYX_ERR(0, 996, __pyx_L1_error)
21941  __Pyx_GOTREF(__pyx_t_47);
21942  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21943 
21944  /* "ADR.pyx":997
21945  * self.ebqe[('a',0,0)],
21946  * self.ebqe[('df',0,0)],
21947  * self.numericalFlux.isDOFBoundary[0], # <<<<<<<<<<<<<<
21948  * self.numericalFlux.ebqe[('u',0)],
21949  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
21950  */
21951  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 997, __pyx_L1_error)
21952  __Pyx_GOTREF(__pyx_t_39);
21953  __pyx_t_48 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_isDOFBoundary); if (unlikely(!__pyx_t_48)) __PYX_ERR(0, 997, __pyx_L1_error)
21954  __Pyx_GOTREF(__pyx_t_48);
21955  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21956  __pyx_t_39 = __Pyx_GetItemInt(__pyx_t_48, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 997, __pyx_L1_error)
21957  __Pyx_GOTREF(__pyx_t_39);
21958  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
21959 
21960  /* "ADR.pyx":998
21961  * self.ebqe[('df',0,0)],
21962  * self.numericalFlux.isDOFBoundary[0],
21963  * self.numericalFlux.ebqe[('u',0)], # <<<<<<<<<<<<<<
21964  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
21965  * self.ebqe[('advectiveFlux_bc_flag',0)],
21966  */
21967  __pyx_t_48 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_48)) __PYX_ERR(0, 998, __pyx_L1_error)
21968  __Pyx_GOTREF(__pyx_t_48);
21969  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_t_48, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 998, __pyx_L1_error)
21970  __Pyx_GOTREF(__pyx_t_49);
21971  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
21972  __pyx_t_48 = PyObject_GetItem(__pyx_t_49, __pyx_tuple__67); if (unlikely(!__pyx_t_48)) __PYX_ERR(0, 998, __pyx_L1_error)
21973  __Pyx_GOTREF(__pyx_t_48);
21974  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
21975 
21976  /* "ADR.pyx":999
21977  * self.numericalFlux.isDOFBoundary[0],
21978  * self.numericalFlux.ebqe[('u',0)],
21979  * self.ebqe[('diffusiveFlux_bc_flag',0,0)], # <<<<<<<<<<<<<<
21980  * self.ebqe[('advectiveFlux_bc_flag',0)],
21981  * self.ebqe[('diffusiveFlux_bc',0,0)],
21982  */
21983  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 999, __pyx_L1_error)
21984  __Pyx_GOTREF(__pyx_t_49);
21985  __pyx_t_50 = PyObject_GetItem(__pyx_t_49, __pyx_tuple__68); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 999, __pyx_L1_error)
21986  __Pyx_GOTREF(__pyx_t_50);
21987  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
21988 
21989  /* "ADR.pyx":1000
21990  * self.numericalFlux.ebqe[('u',0)],
21991  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
21992  * self.ebqe[('advectiveFlux_bc_flag',0)], # <<<<<<<<<<<<<<
21993  * self.ebqe[('diffusiveFlux_bc',0,0)],
21994  * self.ebqe[('advectiveFlux_bc',0)],
21995  */
21996  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1000, __pyx_L1_error)
21997  __Pyx_GOTREF(__pyx_t_49);
21998  __pyx_t_51 = PyObject_GetItem(__pyx_t_49, __pyx_tuple__69); if (unlikely(!__pyx_t_51)) __PYX_ERR(0, 1000, __pyx_L1_error)
21999  __Pyx_GOTREF(__pyx_t_51);
22000  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
22001 
22002  /* "ADR.pyx":1001
22003  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
22004  * self.ebqe[('advectiveFlux_bc_flag',0)],
22005  * self.ebqe[('diffusiveFlux_bc',0,0)], # <<<<<<<<<<<<<<
22006  * self.ebqe[('advectiveFlux_bc',0)],
22007  * self.ebqe['penalty'],
22008  */
22009  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1001, __pyx_L1_error)
22010  __Pyx_GOTREF(__pyx_t_49);
22011  __pyx_t_52 = PyObject_GetItem(__pyx_t_49, __pyx_tuple__70); if (unlikely(!__pyx_t_52)) __PYX_ERR(0, 1001, __pyx_L1_error)
22012  __Pyx_GOTREF(__pyx_t_52);
22013  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
22014 
22015  /* "ADR.pyx":1002
22016  * self.ebqe[('advectiveFlux_bc_flag',0)],
22017  * self.ebqe[('diffusiveFlux_bc',0,0)],
22018  * self.ebqe[('advectiveFlux_bc',0)], # <<<<<<<<<<<<<<
22019  * self.ebqe['penalty'],
22020  * self.numericalFlux.boundaryAdjoint_sigma)
22021  */
22022  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1002, __pyx_L1_error)
22023  __Pyx_GOTREF(__pyx_t_49);
22024  __pyx_t_53 = PyObject_GetItem(__pyx_t_49, __pyx_tuple__71); if (unlikely(!__pyx_t_53)) __PYX_ERR(0, 1002, __pyx_L1_error)
22025  __Pyx_GOTREF(__pyx_t_53);
22026  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
22027 
22028  /* "ADR.pyx":1003
22029  * self.ebqe[('diffusiveFlux_bc',0,0)],
22030  * self.ebqe[('advectiveFlux_bc',0)],
22031  * self.ebqe['penalty'], # <<<<<<<<<<<<<<
22032  * self.numericalFlux.boundaryAdjoint_sigma)
22033  * log("Global residual",level=9,data=r)
22034  */
22035  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1003, __pyx_L1_error)
22036  __Pyx_GOTREF(__pyx_t_49);
22037  __pyx_t_54 = PyObject_GetItem(__pyx_t_49, __pyx_n_s_penalty); if (unlikely(!__pyx_t_54)) __PYX_ERR(0, 1003, __pyx_L1_error)
22038  __Pyx_GOTREF(__pyx_t_54);
22039  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
22040 
22041  /* "ADR.pyx":1004
22042  * self.ebqe[('advectiveFlux_bc',0)],
22043  * self.ebqe['penalty'],
22044  * self.numericalFlux.boundaryAdjoint_sigma) # <<<<<<<<<<<<<<
22045  * log("Global residual",level=9,data=r)
22046  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
22047  */
22048  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1004, __pyx_L1_error)
22049  __Pyx_GOTREF(__pyx_t_49);
22050  __pyx_t_55 = __Pyx_PyObject_GetAttrStr(__pyx_t_49, __pyx_n_s_boundaryAdjoint_sigma); if (unlikely(!__pyx_t_55)) __PYX_ERR(0, 1004, __pyx_L1_error)
22051  __Pyx_GOTREF(__pyx_t_55);
22052  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
22053  __pyx_t_49 = NULL;
22054  __pyx_t_56 = 0;
22055  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
22056  __pyx_t_49 = PyMethod_GET_SELF(__pyx_t_4);
22057  if (likely(__pyx_t_49)) {
22058  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
22059  __Pyx_INCREF(__pyx_t_49);
22060  __Pyx_INCREF(function);
22061  __Pyx_DECREF_SET(__pyx_t_4, function);
22062  __pyx_t_56 = 1;
22063  }
22064  }
22065  #if CYTHON_FAST_PYCALL
22066  if (PyFunction_Check(__pyx_t_4)) {
22067  PyObject *__pyx_temp[54] = {__pyx_t_49, __pyx_t_2, __pyx_t_3, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_5, __pyx_t_19, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_20, __pyx_t_26, __pyx_t_28, __pyx_t_27, __pyx_t_29, __pyx_t_31, __pyx_t_32, __pyx_t_33, __pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_30, __pyx_t_38, __pyx_t_40, __pyx_t_41, __pyx_v_r, __pyx_t_42, __pyx_t_43, __pyx_t_44, __pyx_t_45, __pyx_t_46, __pyx_t_47, __pyx_t_39, __pyx_t_48, __pyx_t_50, __pyx_t_51, __pyx_t_52, __pyx_t_53, __pyx_t_54, __pyx_t_55};
22068  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_56, 53+__pyx_t_56); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
22069  __Pyx_XDECREF(__pyx_t_49); __pyx_t_49 = 0;
22070  __Pyx_GOTREF(__pyx_t_1);
22071  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22072  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22073  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22074  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
22075  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
22076  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
22077  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
22078  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
22079  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
22080  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
22081  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
22082  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
22083  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22084  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
22085  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
22086  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22087  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
22088  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22089  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
22090  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
22091  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
22092  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
22093  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
22094  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
22095  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
22096  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
22097  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
22098  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22099  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
22100  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
22101  __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0;
22102  __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
22103  __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
22104  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
22105  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
22106  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
22107  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22108  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
22109  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
22110  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
22111  __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
22112  __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
22113  __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
22114  __Pyx_DECREF(__pyx_t_47); __pyx_t_47 = 0;
22115  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
22116  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
22117  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
22118  __Pyx_DECREF(__pyx_t_51); __pyx_t_51 = 0;
22119  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
22120  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
22121  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
22122  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
22123  } else
22124  #endif
22125  #if CYTHON_FAST_PYCCALL
22126  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
22127  PyObject *__pyx_temp[54] = {__pyx_t_49, __pyx_t_2, __pyx_t_3, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_5, __pyx_t_19, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_20, __pyx_t_26, __pyx_t_28, __pyx_t_27, __pyx_t_29, __pyx_t_31, __pyx_t_32, __pyx_t_33, __pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_30, __pyx_t_38, __pyx_t_40, __pyx_t_41, __pyx_v_r, __pyx_t_42, __pyx_t_43, __pyx_t_44, __pyx_t_45, __pyx_t_46, __pyx_t_47, __pyx_t_39, __pyx_t_48, __pyx_t_50, __pyx_t_51, __pyx_t_52, __pyx_t_53, __pyx_t_54, __pyx_t_55};
22128  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_56, 53+__pyx_t_56); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
22129  __Pyx_XDECREF(__pyx_t_49); __pyx_t_49 = 0;
22130  __Pyx_GOTREF(__pyx_t_1);
22131  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22132  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22133  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22134  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
22135  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
22136  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
22137  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
22138  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
22139  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
22140  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
22141  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
22142  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
22143  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22144  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
22145  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
22146  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22147  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
22148  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22149  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
22150  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
22151  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
22152  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
22153  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
22154  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
22155  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
22156  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
22157  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
22158  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22159  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
22160  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
22161  __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0;
22162  __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
22163  __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
22164  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
22165  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
22166  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
22167  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22168  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
22169  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
22170  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
22171  __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
22172  __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
22173  __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
22174  __Pyx_DECREF(__pyx_t_47); __pyx_t_47 = 0;
22175  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
22176  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
22177  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
22178  __Pyx_DECREF(__pyx_t_51); __pyx_t_51 = 0;
22179  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
22180  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
22181  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
22182  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
22183  } else
22184  #endif
22185  {
22186  __pyx_t_57 = PyTuple_New(53+__pyx_t_56); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 949, __pyx_L1_error)
22187  __Pyx_GOTREF(__pyx_t_57);
22188  if (__pyx_t_49) {
22189  __Pyx_GIVEREF(__pyx_t_49); PyTuple_SET_ITEM(__pyx_t_57, 0, __pyx_t_49); __pyx_t_49 = NULL;
22190  }
22191  __Pyx_GIVEREF(__pyx_t_2);
22192  PyTuple_SET_ITEM(__pyx_t_57, 0+__pyx_t_56, __pyx_t_2);
22193  __Pyx_GIVEREF(__pyx_t_3);
22194  PyTuple_SET_ITEM(__pyx_t_57, 1+__pyx_t_56, __pyx_t_3);
22195  __Pyx_GIVEREF(__pyx_t_6);
22196  PyTuple_SET_ITEM(__pyx_t_57, 2+__pyx_t_56, __pyx_t_6);
22197  __Pyx_GIVEREF(__pyx_t_7);
22198  PyTuple_SET_ITEM(__pyx_t_57, 3+__pyx_t_56, __pyx_t_7);
22199  __Pyx_GIVEREF(__pyx_t_8);
22200  PyTuple_SET_ITEM(__pyx_t_57, 4+__pyx_t_56, __pyx_t_8);
22201  __Pyx_GIVEREF(__pyx_t_9);
22202  PyTuple_SET_ITEM(__pyx_t_57, 5+__pyx_t_56, __pyx_t_9);
22203  __Pyx_GIVEREF(__pyx_t_10);
22204  PyTuple_SET_ITEM(__pyx_t_57, 6+__pyx_t_56, __pyx_t_10);
22205  __Pyx_GIVEREF(__pyx_t_11);
22206  PyTuple_SET_ITEM(__pyx_t_57, 7+__pyx_t_56, __pyx_t_11);
22207  __Pyx_GIVEREF(__pyx_t_12);
22208  PyTuple_SET_ITEM(__pyx_t_57, 8+__pyx_t_56, __pyx_t_12);
22209  __Pyx_GIVEREF(__pyx_t_13);
22210  PyTuple_SET_ITEM(__pyx_t_57, 9+__pyx_t_56, __pyx_t_13);
22211  __Pyx_GIVEREF(__pyx_t_14);
22212  PyTuple_SET_ITEM(__pyx_t_57, 10+__pyx_t_56, __pyx_t_14);
22213  __Pyx_GIVEREF(__pyx_t_15);
22214  PyTuple_SET_ITEM(__pyx_t_57, 11+__pyx_t_56, __pyx_t_15);
22215  __Pyx_GIVEREF(__pyx_t_16);
22216  PyTuple_SET_ITEM(__pyx_t_57, 12+__pyx_t_56, __pyx_t_16);
22217  __Pyx_GIVEREF(__pyx_t_17);
22218  PyTuple_SET_ITEM(__pyx_t_57, 13+__pyx_t_56, __pyx_t_17);
22219  __Pyx_GIVEREF(__pyx_t_18);
22220  PyTuple_SET_ITEM(__pyx_t_57, 14+__pyx_t_56, __pyx_t_18);
22221  __Pyx_GIVEREF(__pyx_t_5);
22222  PyTuple_SET_ITEM(__pyx_t_57, 15+__pyx_t_56, __pyx_t_5);
22223  __Pyx_GIVEREF(__pyx_t_19);
22224  PyTuple_SET_ITEM(__pyx_t_57, 16+__pyx_t_56, __pyx_t_19);
22225  __Pyx_GIVEREF(__pyx_t_21);
22226  PyTuple_SET_ITEM(__pyx_t_57, 17+__pyx_t_56, __pyx_t_21);
22227  __Pyx_GIVEREF(__pyx_t_22);
22228  PyTuple_SET_ITEM(__pyx_t_57, 18+__pyx_t_56, __pyx_t_22);
22229  __Pyx_GIVEREF(__pyx_t_23);
22230  PyTuple_SET_ITEM(__pyx_t_57, 19+__pyx_t_56, __pyx_t_23);
22231  __Pyx_GIVEREF(__pyx_t_24);
22232  PyTuple_SET_ITEM(__pyx_t_57, 20+__pyx_t_56, __pyx_t_24);
22233  __Pyx_GIVEREF(__pyx_t_25);
22234  PyTuple_SET_ITEM(__pyx_t_57, 21+__pyx_t_56, __pyx_t_25);
22235  __Pyx_GIVEREF(__pyx_t_20);
22236  PyTuple_SET_ITEM(__pyx_t_57, 22+__pyx_t_56, __pyx_t_20);
22237  __Pyx_GIVEREF(__pyx_t_26);
22238  PyTuple_SET_ITEM(__pyx_t_57, 23+__pyx_t_56, __pyx_t_26);
22239  __Pyx_GIVEREF(__pyx_t_28);
22240  PyTuple_SET_ITEM(__pyx_t_57, 24+__pyx_t_56, __pyx_t_28);
22241  __Pyx_GIVEREF(__pyx_t_27);
22242  PyTuple_SET_ITEM(__pyx_t_57, 25+__pyx_t_56, __pyx_t_27);
22243  __Pyx_GIVEREF(__pyx_t_29);
22244  PyTuple_SET_ITEM(__pyx_t_57, 26+__pyx_t_56, __pyx_t_29);
22245  __Pyx_GIVEREF(__pyx_t_31);
22246  PyTuple_SET_ITEM(__pyx_t_57, 27+__pyx_t_56, __pyx_t_31);
22247  __Pyx_GIVEREF(__pyx_t_32);
22248  PyTuple_SET_ITEM(__pyx_t_57, 28+__pyx_t_56, __pyx_t_32);
22249  __Pyx_GIVEREF(__pyx_t_33);
22250  PyTuple_SET_ITEM(__pyx_t_57, 29+__pyx_t_56, __pyx_t_33);
22251  __Pyx_GIVEREF(__pyx_t_34);
22252  PyTuple_SET_ITEM(__pyx_t_57, 30+__pyx_t_56, __pyx_t_34);
22253  __Pyx_GIVEREF(__pyx_t_35);
22254  PyTuple_SET_ITEM(__pyx_t_57, 31+__pyx_t_56, __pyx_t_35);
22255  __Pyx_GIVEREF(__pyx_t_36);
22256  PyTuple_SET_ITEM(__pyx_t_57, 32+__pyx_t_56, __pyx_t_36);
22257  __Pyx_GIVEREF(__pyx_t_37);
22258  PyTuple_SET_ITEM(__pyx_t_57, 33+__pyx_t_56, __pyx_t_37);
22259  __Pyx_GIVEREF(__pyx_t_30);
22260  PyTuple_SET_ITEM(__pyx_t_57, 34+__pyx_t_56, __pyx_t_30);
22261  __Pyx_GIVEREF(__pyx_t_38);
22262  PyTuple_SET_ITEM(__pyx_t_57, 35+__pyx_t_56, __pyx_t_38);
22263  __Pyx_GIVEREF(__pyx_t_40);
22264  PyTuple_SET_ITEM(__pyx_t_57, 36+__pyx_t_56, __pyx_t_40);
22265  __Pyx_GIVEREF(__pyx_t_41);
22266  PyTuple_SET_ITEM(__pyx_t_57, 37+__pyx_t_56, __pyx_t_41);
22267  __Pyx_INCREF(__pyx_v_r);
22268  __Pyx_GIVEREF(__pyx_v_r);
22269  PyTuple_SET_ITEM(__pyx_t_57, 38+__pyx_t_56, __pyx_v_r);
22270  __Pyx_GIVEREF(__pyx_t_42);
22271  PyTuple_SET_ITEM(__pyx_t_57, 39+__pyx_t_56, __pyx_t_42);
22272  __Pyx_GIVEREF(__pyx_t_43);
22273  PyTuple_SET_ITEM(__pyx_t_57, 40+__pyx_t_56, __pyx_t_43);
22274  __Pyx_GIVEREF(__pyx_t_44);
22275  PyTuple_SET_ITEM(__pyx_t_57, 41+__pyx_t_56, __pyx_t_44);
22276  __Pyx_GIVEREF(__pyx_t_45);
22277  PyTuple_SET_ITEM(__pyx_t_57, 42+__pyx_t_56, __pyx_t_45);
22278  __Pyx_GIVEREF(__pyx_t_46);
22279  PyTuple_SET_ITEM(__pyx_t_57, 43+__pyx_t_56, __pyx_t_46);
22280  __Pyx_GIVEREF(__pyx_t_47);
22281  PyTuple_SET_ITEM(__pyx_t_57, 44+__pyx_t_56, __pyx_t_47);
22282  __Pyx_GIVEREF(__pyx_t_39);
22283  PyTuple_SET_ITEM(__pyx_t_57, 45+__pyx_t_56, __pyx_t_39);
22284  __Pyx_GIVEREF(__pyx_t_48);
22285  PyTuple_SET_ITEM(__pyx_t_57, 46+__pyx_t_56, __pyx_t_48);
22286  __Pyx_GIVEREF(__pyx_t_50);
22287  PyTuple_SET_ITEM(__pyx_t_57, 47+__pyx_t_56, __pyx_t_50);
22288  __Pyx_GIVEREF(__pyx_t_51);
22289  PyTuple_SET_ITEM(__pyx_t_57, 48+__pyx_t_56, __pyx_t_51);
22290  __Pyx_GIVEREF(__pyx_t_52);
22291  PyTuple_SET_ITEM(__pyx_t_57, 49+__pyx_t_56, __pyx_t_52);
22292  __Pyx_GIVEREF(__pyx_t_53);
22293  PyTuple_SET_ITEM(__pyx_t_57, 50+__pyx_t_56, __pyx_t_53);
22294  __Pyx_GIVEREF(__pyx_t_54);
22295  PyTuple_SET_ITEM(__pyx_t_57, 51+__pyx_t_56, __pyx_t_54);
22296  __Pyx_GIVEREF(__pyx_t_55);
22297  PyTuple_SET_ITEM(__pyx_t_57, 52+__pyx_t_56, __pyx_t_55);
22298  __pyx_t_2 = 0;
22299  __pyx_t_3 = 0;
22300  __pyx_t_6 = 0;
22301  __pyx_t_7 = 0;
22302  __pyx_t_8 = 0;
22303  __pyx_t_9 = 0;
22304  __pyx_t_10 = 0;
22305  __pyx_t_11 = 0;
22306  __pyx_t_12 = 0;
22307  __pyx_t_13 = 0;
22308  __pyx_t_14 = 0;
22309  __pyx_t_15 = 0;
22310  __pyx_t_16 = 0;
22311  __pyx_t_17 = 0;
22312  __pyx_t_18 = 0;
22313  __pyx_t_5 = 0;
22314  __pyx_t_19 = 0;
22315  __pyx_t_21 = 0;
22316  __pyx_t_22 = 0;
22317  __pyx_t_23 = 0;
22318  __pyx_t_24 = 0;
22319  __pyx_t_25 = 0;
22320  __pyx_t_20 = 0;
22321  __pyx_t_26 = 0;
22322  __pyx_t_28 = 0;
22323  __pyx_t_27 = 0;
22324  __pyx_t_29 = 0;
22325  __pyx_t_31 = 0;
22326  __pyx_t_32 = 0;
22327  __pyx_t_33 = 0;
22328  __pyx_t_34 = 0;
22329  __pyx_t_35 = 0;
22330  __pyx_t_36 = 0;
22331  __pyx_t_37 = 0;
22332  __pyx_t_30 = 0;
22333  __pyx_t_38 = 0;
22334  __pyx_t_40 = 0;
22335  __pyx_t_41 = 0;
22336  __pyx_t_42 = 0;
22337  __pyx_t_43 = 0;
22338  __pyx_t_44 = 0;
22339  __pyx_t_45 = 0;
22340  __pyx_t_46 = 0;
22341  __pyx_t_47 = 0;
22342  __pyx_t_39 = 0;
22343  __pyx_t_48 = 0;
22344  __pyx_t_50 = 0;
22345  __pyx_t_51 = 0;
22346  __pyx_t_52 = 0;
22347  __pyx_t_53 = 0;
22348  __pyx_t_54 = 0;
22349  __pyx_t_55 = 0;
22350  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
22351  __Pyx_GOTREF(__pyx_t_1);
22352  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
22353  }
22354  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22355  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22356 
22357  /* "ADR.pyx":1005
22358  * self.ebqe['penalty'],
22359  * self.numericalFlux.boundaryAdjoint_sigma)
22360  * log("Global residual",level=9,data=r) # <<<<<<<<<<<<<<
22361  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
22362  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
22363  */
22364  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error)
22365  __Pyx_GOTREF(__pyx_t_1);
22366  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1005, __pyx_L1_error)
22367  __Pyx_GOTREF(__pyx_t_4);
22368  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_level, __pyx_int_9) < 0) __PYX_ERR(0, 1005, __pyx_L1_error)
22369  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_data, __pyx_v_r) < 0) __PYX_ERR(0, 1005, __pyx_L1_error)
22370  __pyx_t_57 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__72, __pyx_t_4); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1005, __pyx_L1_error)
22371  __Pyx_GOTREF(__pyx_t_57);
22372  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22373  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22374  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
22375 
22376  /* "ADR.pyx":1006
22377  * self.numericalFlux.boundaryAdjoint_sigma)
22378  * log("Global residual",level=9,data=r)
22379  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned]))) # <<<<<<<<<<<<<<
22380  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
22381  * self.nonlinear_function_evaluations += 1
22382  */
22383  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_fabs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
22384  __Pyx_GOTREF(__pyx_t_4);
22385  __pyx_t_55 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_flat); if (unlikely(!__pyx_t_55)) __PYX_ERR(0, 1006, __pyx_L1_error)
22386  __Pyx_GOTREF(__pyx_t_55);
22387  __pyx_t_54 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_54)) __PYX_ERR(0, 1006, __pyx_L1_error)
22388  __Pyx_GOTREF(__pyx_t_54);
22389  __pyx_t_53 = __Pyx_PyObject_GetAttrStr(__pyx_t_54, __pyx_n_s_nElements_owned); if (unlikely(!__pyx_t_53)) __PYX_ERR(0, 1006, __pyx_L1_error)
22390  __Pyx_GOTREF(__pyx_t_53);
22391  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
22392  __pyx_t_54 = __Pyx_PyObject_GetSlice(__pyx_t_55, 0, 0, NULL, &__pyx_t_53, NULL, 0, 0, 1); if (unlikely(!__pyx_t_54)) __PYX_ERR(0, 1006, __pyx_L1_error)
22393  __Pyx_GOTREF(__pyx_t_54);
22394  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
22395  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
22396  __pyx_t_53 = PyTuple_New(1); if (unlikely(!__pyx_t_53)) __PYX_ERR(0, 1006, __pyx_L1_error)
22397  __Pyx_GOTREF(__pyx_t_53);
22398  __Pyx_GIVEREF(__pyx_t_54);
22399  PyTuple_SET_ITEM(__pyx_t_53, 0, __pyx_t_54);
22400  __pyx_t_54 = 0;
22401  __pyx_t_54 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_53, NULL); if (unlikely(!__pyx_t_54)) __PYX_ERR(0, 1006, __pyx_L1_error)
22402  __Pyx_GOTREF(__pyx_t_54);
22403  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
22404  __Pyx_INCREF(__pyx_v_globalSum);
22405  __pyx_t_53 = __pyx_v_globalSum; __pyx_t_55 = NULL;
22406  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_53))) {
22407  __pyx_t_55 = PyMethod_GET_SELF(__pyx_t_53);
22408  if (likely(__pyx_t_55)) {
22409  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_53);
22410  __Pyx_INCREF(__pyx_t_55);
22411  __Pyx_INCREF(function);
22412  __Pyx_DECREF_SET(__pyx_t_53, function);
22413  }
22414  }
22415  if (!__pyx_t_55) {
22416  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_53, __pyx_t_54); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
22417  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
22418  __Pyx_GOTREF(__pyx_t_1);
22419  } else {
22420  #if CYTHON_FAST_PYCALL
22421  if (PyFunction_Check(__pyx_t_53)) {
22422  PyObject *__pyx_temp[2] = {__pyx_t_55, __pyx_t_54};
22423  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_53, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
22424  __Pyx_XDECREF(__pyx_t_55); __pyx_t_55 = 0;
22425  __Pyx_GOTREF(__pyx_t_1);
22426  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
22427  } else
22428  #endif
22429  #if CYTHON_FAST_PYCCALL
22430  if (__Pyx_PyFastCFunction_Check(__pyx_t_53)) {
22431  PyObject *__pyx_temp[2] = {__pyx_t_55, __pyx_t_54};
22432  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_53, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
22433  __Pyx_XDECREF(__pyx_t_55); __pyx_t_55 = 0;
22434  __Pyx_GOTREF(__pyx_t_1);
22435  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
22436  } else
22437  #endif
22438  {
22439  __pyx_t_52 = PyTuple_New(1+1); if (unlikely(!__pyx_t_52)) __PYX_ERR(0, 1006, __pyx_L1_error)
22440  __Pyx_GOTREF(__pyx_t_52);
22441  __Pyx_GIVEREF(__pyx_t_55); PyTuple_SET_ITEM(__pyx_t_52, 0, __pyx_t_55); __pyx_t_55 = NULL;
22442  __Pyx_GIVEREF(__pyx_t_54);
22443  PyTuple_SET_ITEM(__pyx_t_52, 0+1, __pyx_t_54);
22444  __pyx_t_54 = 0;
22445  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_53, __pyx_t_52, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
22446  __Pyx_GOTREF(__pyx_t_1);
22447  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
22448  }
22449  }
22450  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
22451  __pyx_t_53 = NULL;
22452  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
22453  __pyx_t_53 = PyMethod_GET_SELF(__pyx_t_4);
22454  if (likely(__pyx_t_53)) {
22455  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
22456  __Pyx_INCREF(__pyx_t_53);
22457  __Pyx_INCREF(function);
22458  __Pyx_DECREF_SET(__pyx_t_4, function);
22459  }
22460  }
22461  if (!__pyx_t_53) {
22462  __pyx_t_57 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1006, __pyx_L1_error)
22463  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22464  __Pyx_GOTREF(__pyx_t_57);
22465  } else {
22466  #if CYTHON_FAST_PYCALL
22467  if (PyFunction_Check(__pyx_t_4)) {
22468  PyObject *__pyx_temp[2] = {__pyx_t_53, __pyx_t_1};
22469  __pyx_t_57 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1006, __pyx_L1_error)
22470  __Pyx_XDECREF(__pyx_t_53); __pyx_t_53 = 0;
22471  __Pyx_GOTREF(__pyx_t_57);
22472  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22473  } else
22474  #endif
22475  #if CYTHON_FAST_PYCCALL
22476  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
22477  PyObject *__pyx_temp[2] = {__pyx_t_53, __pyx_t_1};
22478  __pyx_t_57 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1006, __pyx_L1_error)
22479  __Pyx_XDECREF(__pyx_t_53); __pyx_t_53 = 0;
22480  __Pyx_GOTREF(__pyx_t_57);
22481  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22482  } else
22483  #endif
22484  {
22485  __pyx_t_52 = PyTuple_New(1+1); if (unlikely(!__pyx_t_52)) __PYX_ERR(0, 1006, __pyx_L1_error)
22486  __Pyx_GOTREF(__pyx_t_52);
22487  __Pyx_GIVEREF(__pyx_t_53); PyTuple_SET_ITEM(__pyx_t_52, 0, __pyx_t_53); __pyx_t_53 = NULL;
22488  __Pyx_GIVEREF(__pyx_t_1);
22489  PyTuple_SET_ITEM(__pyx_t_52, 0+1, __pyx_t_1);
22490  __pyx_t_1 = 0;
22491  __pyx_t_57 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_52, NULL); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1006, __pyx_L1_error)
22492  __Pyx_GOTREF(__pyx_t_57);
22493  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
22494  }
22495  }
22496  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22497  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
22498  __Pyx_GOTREF(__pyx_t_4);
22499  if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_massConservationError, __pyx_t_57) < 0) __PYX_ERR(0, 1006, __pyx_L1_error)
22500  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
22501  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22502 
22503  /* "ADR.pyx":1007
22504  * log("Global residual",level=9,data=r)
22505  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
22506  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError) # <<<<<<<<<<<<<<
22507  * self.nonlinear_function_evaluations += 1
22508  * def getJacobian(self,jacobian):
22509  */
22510  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1007, __pyx_L1_error)
22511  __Pyx_GOTREF(__pyx_t_4);
22512  __pyx_t_57 = PyDict_New(); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1007, __pyx_L1_error)
22513  __Pyx_GOTREF(__pyx_t_57);
22514  if (PyDict_SetItem(__pyx_t_57, __pyx_n_s_level, __pyx_int_3) < 0) __PYX_ERR(0, 1007, __pyx_L1_error)
22515  __pyx_t_52 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_52)) __PYX_ERR(0, 1007, __pyx_L1_error)
22516  __Pyx_GOTREF(__pyx_t_52);
22517  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_52, __pyx_n_s_massConservationError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error)
22518  __Pyx_GOTREF(__pyx_t_1);
22519  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
22520  if (PyDict_SetItem(__pyx_t_57, __pyx_n_s_data, __pyx_t_1) < 0) __PYX_ERR(0, 1007, __pyx_L1_error)
22521  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22522  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__73, __pyx_t_57); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error)
22523  __Pyx_GOTREF(__pyx_t_1);
22524  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22525  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
22526  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22527 
22528  /* "ADR.pyx":1008
22529  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
22530  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
22531  * self.nonlinear_function_evaluations += 1 # <<<<<<<<<<<<<<
22532  * def getJacobian(self,jacobian):
22533  * #import superluWrappers
22534  */
22535  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_function_evaluations); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error)
22536  __Pyx_GOTREF(__pyx_t_1);
22537  __pyx_t_57 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1008, __pyx_L1_error)
22538  __Pyx_GOTREF(__pyx_t_57);
22539  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22540  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_function_evaluations, __pyx_t_57) < 0) __PYX_ERR(0, 1008, __pyx_L1_error)
22541  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
22542 
22543  /* "ADR.pyx":936
22544  * def calculateCoefficients(self):
22545  * pass
22546  * def getResidual(self,u,r): # <<<<<<<<<<<<<<
22547  * import pdb
22548  * import copy
22549  */
22550 
22551  /* function exit code */
22552  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22553  goto __pyx_L0;
22554  __pyx_L1_error:;
22555  __Pyx_XDECREF(__pyx_t_1);
22556  __Pyx_XDECREF(__pyx_t_2);
22557  __Pyx_XDECREF(__pyx_t_3);
22558  __Pyx_XDECREF(__pyx_t_4);
22559  __Pyx_XDECREF(__pyx_t_5);
22560  __Pyx_XDECREF(__pyx_t_6);
22561  __Pyx_XDECREF(__pyx_t_7);
22562  __Pyx_XDECREF(__pyx_t_8);
22563  __Pyx_XDECREF(__pyx_t_9);
22564  __Pyx_XDECREF(__pyx_t_10);
22565  __Pyx_XDECREF(__pyx_t_11);
22566  __Pyx_XDECREF(__pyx_t_12);
22567  __Pyx_XDECREF(__pyx_t_13);
22568  __Pyx_XDECREF(__pyx_t_14);
22569  __Pyx_XDECREF(__pyx_t_15);
22570  __Pyx_XDECREF(__pyx_t_16);
22571  __Pyx_XDECREF(__pyx_t_17);
22572  __Pyx_XDECREF(__pyx_t_18);
22573  __Pyx_XDECREF(__pyx_t_19);
22574  __Pyx_XDECREF(__pyx_t_20);
22575  __Pyx_XDECREF(__pyx_t_21);
22576  __Pyx_XDECREF(__pyx_t_22);
22577  __Pyx_XDECREF(__pyx_t_23);
22578  __Pyx_XDECREF(__pyx_t_24);
22579  __Pyx_XDECREF(__pyx_t_25);
22580  __Pyx_XDECREF(__pyx_t_26);
22581  __Pyx_XDECREF(__pyx_t_27);
22582  __Pyx_XDECREF(__pyx_t_28);
22583  __Pyx_XDECREF(__pyx_t_29);
22584  __Pyx_XDECREF(__pyx_t_30);
22585  __Pyx_XDECREF(__pyx_t_31);
22586  __Pyx_XDECREF(__pyx_t_32);
22587  __Pyx_XDECREF(__pyx_t_33);
22588  __Pyx_XDECREF(__pyx_t_34);
22589  __Pyx_XDECREF(__pyx_t_35);
22590  __Pyx_XDECREF(__pyx_t_36);
22591  __Pyx_XDECREF(__pyx_t_37);
22592  __Pyx_XDECREF(__pyx_t_38);
22593  __Pyx_XDECREF(__pyx_t_39);
22594  __Pyx_XDECREF(__pyx_t_40);
22595  __Pyx_XDECREF(__pyx_t_41);
22596  __Pyx_XDECREF(__pyx_t_42);
22597  __Pyx_XDECREF(__pyx_t_43);
22598  __Pyx_XDECREF(__pyx_t_44);
22599  __Pyx_XDECREF(__pyx_t_45);
22600  __Pyx_XDECREF(__pyx_t_46);
22601  __Pyx_XDECREF(__pyx_t_47);
22602  __Pyx_XDECREF(__pyx_t_48);
22603  __Pyx_XDECREF(__pyx_t_49);
22604  __Pyx_XDECREF(__pyx_t_50);
22605  __Pyx_XDECREF(__pyx_t_51);
22606  __Pyx_XDECREF(__pyx_t_52);
22607  __Pyx_XDECREF(__pyx_t_53);
22608  __Pyx_XDECREF(__pyx_t_54);
22609  __Pyx_XDECREF(__pyx_t_55);
22610  __Pyx_XDECREF(__pyx_t_57);
22611  __Pyx_AddTraceback("ADR.LevelModel.getResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
22612  __pyx_r = NULL;
22613  __pyx_L0:;
22614  __Pyx_XDECREF(__pyx_v_pdb);
22615  __Pyx_XDECREF(__pyx_v_copy);
22616  __Pyx_XDECREF(__pyx_v_globalSum);
22617  __Pyx_XGIVEREF(__pyx_r);
22618  __Pyx_RefNannyFinishContext();
22619  return __pyx_r;
22620 }
22621 
22622 /* "ADR.pyx":1009
22623  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
22624  * self.nonlinear_function_evaluations += 1
22625  * def getJacobian(self,jacobian): # <<<<<<<<<<<<<<
22626  * #import superluWrappers
22627  * #import numpy
22628  */
22629 
22630 /* Python wrapper */
22631 static PyObject *__pyx_pw_3ADR_10LevelModel_7getJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22632 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_7getJacobian = {"getJacobian", (PyCFunction)__pyx_pw_3ADR_10LevelModel_7getJacobian, METH_VARARGS|METH_KEYWORDS, 0};
22633 static PyObject *__pyx_pw_3ADR_10LevelModel_7getJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22634  PyObject *__pyx_v_self = 0;
22635  PyObject *__pyx_v_jacobian = 0;
22636  PyObject *__pyx_r = 0;
22637  __Pyx_RefNannyDeclarations
22638  __Pyx_RefNannySetupContext("getJacobian (wrapper)", 0);
22639  {
22640  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_jacobian,0};
22641  PyObject* values[2] = {0,0};
22642  if (unlikely(__pyx_kwds)) {
22643  Py_ssize_t kw_args;
22644  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22645  switch (pos_args) {
22646  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22647  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22648  case 0: break;
22649  default: goto __pyx_L5_argtuple_error;
22650  }
22651  kw_args = PyDict_Size(__pyx_kwds);
22652  switch (pos_args) {
22653  case 0:
22654  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
22655  else goto __pyx_L5_argtuple_error;
22656  case 1:
22657  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_jacobian)) != 0)) kw_args--;
22658  else {
22659  __Pyx_RaiseArgtupleInvalid("getJacobian", 1, 2, 2, 1); __PYX_ERR(0, 1009, __pyx_L3_error)
22660  }
22661  }
22662  if (unlikely(kw_args > 0)) {
22663  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getJacobian") < 0)) __PYX_ERR(0, 1009, __pyx_L3_error)
22664  }
22665  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
22666  goto __pyx_L5_argtuple_error;
22667  } else {
22668  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22669  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22670  }
22671  __pyx_v_self = values[0];
22672  __pyx_v_jacobian = values[1];
22673  }
22674  goto __pyx_L4_argument_unpacking_done;
22675  __pyx_L5_argtuple_error:;
22676  __Pyx_RaiseArgtupleInvalid("getJacobian", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1009, __pyx_L3_error)
22677  __pyx_L3_error:;
22678  __Pyx_AddTraceback("ADR.LevelModel.getJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
22679  __Pyx_RefNannyFinishContext();
22680  return NULL;
22681  __pyx_L4_argument_unpacking_done:;
22682  __pyx_r = __pyx_pf_3ADR_10LevelModel_6getJacobian(__pyx_self, __pyx_v_self, __pyx_v_jacobian);
22683 
22684  /* function exit code */
22685  __Pyx_RefNannyFinishContext();
22686  return __pyx_r;
22687 }
22688 
22689 static PyObject *__pyx_pf_3ADR_10LevelModel_6getJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_jacobian) {
22690  CYTHON_UNUSED PyObject *__pyx_v_pdb = NULL;
22691  PyObject *__pyx_r = NULL;
22692  __Pyx_RefNannyDeclarations
22693  PyObject *__pyx_t_1 = NULL;
22694  PyObject *__pyx_t_2 = NULL;
22695  PyObject *__pyx_t_3 = NULL;
22696  PyObject *__pyx_t_4 = NULL;
22697  int __pyx_t_5;
22698  PyObject *__pyx_t_6 = NULL;
22699  PyObject *__pyx_t_7 = NULL;
22700  PyObject *__pyx_t_8 = NULL;
22701  PyObject *__pyx_t_9 = NULL;
22702  PyObject *__pyx_t_10 = NULL;
22703  PyObject *__pyx_t_11 = NULL;
22704  PyObject *__pyx_t_12 = NULL;
22705  PyObject *__pyx_t_13 = NULL;
22706  PyObject *__pyx_t_14 = NULL;
22707  PyObject *__pyx_t_15 = NULL;
22708  PyObject *__pyx_t_16 = NULL;
22709  PyObject *__pyx_t_17 = NULL;
22710  PyObject *__pyx_t_18 = NULL;
22711  PyObject *__pyx_t_19 = NULL;
22712  PyObject *__pyx_t_20 = NULL;
22713  PyObject *__pyx_t_21 = NULL;
22714  PyObject *__pyx_t_22 = NULL;
22715  PyObject *__pyx_t_23 = NULL;
22716  PyObject *__pyx_t_24 = NULL;
22717  PyObject *__pyx_t_25 = NULL;
22718  PyObject *__pyx_t_26 = NULL;
22719  PyObject *__pyx_t_27 = NULL;
22720  PyObject *__pyx_t_28 = NULL;
22721  PyObject *__pyx_t_29 = NULL;
22722  PyObject *__pyx_t_30 = NULL;
22723  PyObject *__pyx_t_31 = NULL;
22724  PyObject *__pyx_t_32 = NULL;
22725  PyObject *__pyx_t_33 = NULL;
22726  PyObject *__pyx_t_34 = NULL;
22727  PyObject *__pyx_t_35 = NULL;
22728  PyObject *__pyx_t_36 = NULL;
22729  PyObject *__pyx_t_37 = NULL;
22730  PyObject *__pyx_t_38 = NULL;
22731  PyObject *__pyx_t_39 = NULL;
22732  PyObject *__pyx_t_40 = NULL;
22733  PyObject *__pyx_t_41 = NULL;
22734  PyObject *__pyx_t_42 = NULL;
22735  PyObject *__pyx_t_43 = NULL;
22736  PyObject *__pyx_t_44 = NULL;
22737  PyObject *__pyx_t_45 = NULL;
22738  PyObject *__pyx_t_46 = NULL;
22739  PyObject *__pyx_t_47 = NULL;
22740  PyObject *__pyx_t_48 = NULL;
22741  PyObject *__pyx_t_49 = NULL;
22742  PyObject *__pyx_t_50 = NULL;
22743  PyObject *__pyx_t_51 = NULL;
22744  PyObject *__pyx_t_52 = NULL;
22745  PyObject *__pyx_t_53 = NULL;
22746  PyObject *__pyx_t_54 = NULL;
22747  PyObject *__pyx_t_55 = NULL;
22748  PyObject *__pyx_t_56 = NULL;
22749  PyObject *__pyx_t_57 = NULL;
22750  PyObject *__pyx_t_58 = NULL;
22751  __Pyx_RefNannySetupContext("getJacobian", 0);
22752 
22753  /* "ADR.pyx":1012
22754  * #import superluWrappers
22755  * #import numpy
22756  * import pdb # <<<<<<<<<<<<<<
22757  * cfemIntegrals.zeroJacobian_CSR(self.nNonzerosInJacobian,jacobian)
22758  * self.adr.calculateJacobian(#element
22759  */
22760  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pdb, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error)
22761  __Pyx_GOTREF(__pyx_t_1);
22762  __pyx_v_pdb = __pyx_t_1;
22763  __pyx_t_1 = 0;
22764 
22765  /* "ADR.pyx":1013
22766  * #import numpy
22767  * import pdb
22768  * cfemIntegrals.zeroJacobian_CSR(self.nNonzerosInJacobian,jacobian) # <<<<<<<<<<<<<<
22769  * self.adr.calculateJacobian(#element
22770  * self.u[0].femSpace.elementMaps.psi,
22771  */
22772  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
22773  __Pyx_GOTREF(__pyx_t_2);
22774  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeroJacobian_CSR); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error)
22775  __Pyx_GOTREF(__pyx_t_3);
22776  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22777  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nNonzerosInJacobian); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
22778  __Pyx_GOTREF(__pyx_t_2);
22779  __pyx_t_4 = NULL;
22780  __pyx_t_5 = 0;
22781  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
22782  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
22783  if (likely(__pyx_t_4)) {
22784  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
22785  __Pyx_INCREF(__pyx_t_4);
22786  __Pyx_INCREF(function);
22787  __Pyx_DECREF_SET(__pyx_t_3, function);
22788  __pyx_t_5 = 1;
22789  }
22790  }
22791  #if CYTHON_FAST_PYCALL
22792  if (PyFunction_Check(__pyx_t_3)) {
22793  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_jacobian};
22794  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
22795  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22796  __Pyx_GOTREF(__pyx_t_1);
22797  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22798  } else
22799  #endif
22800  #if CYTHON_FAST_PYCCALL
22801  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
22802  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_jacobian};
22803  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
22804  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22805  __Pyx_GOTREF(__pyx_t_1);
22806  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22807  } else
22808  #endif
22809  {
22810  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1013, __pyx_L1_error)
22811  __Pyx_GOTREF(__pyx_t_6);
22812  if (__pyx_t_4) {
22813  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
22814  }
22815  __Pyx_GIVEREF(__pyx_t_2);
22816  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
22817  __Pyx_INCREF(__pyx_v_jacobian);
22818  __Pyx_GIVEREF(__pyx_v_jacobian);
22819  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_jacobian);
22820  __pyx_t_2 = 0;
22821  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
22822  __Pyx_GOTREF(__pyx_t_1);
22823  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22824  }
22825  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22826  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22827 
22828  /* "ADR.pyx":1014
22829  * import pdb
22830  * cfemIntegrals.zeroJacobian_CSR(self.nNonzerosInJacobian,jacobian)
22831  * self.adr.calculateJacobian(#element # <<<<<<<<<<<<<<
22832  * self.u[0].femSpace.elementMaps.psi,
22833  * self.u[0].femSpace.elementMaps.grad_psi,
22834  */
22835  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_adr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error)
22836  __Pyx_GOTREF(__pyx_t_3);
22837  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_calculateJacobian); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1014, __pyx_L1_error)
22838  __Pyx_GOTREF(__pyx_t_6);
22839  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22840 
22841  /* "ADR.pyx":1015
22842  * cfemIntegrals.zeroJacobian_CSR(self.nNonzerosInJacobian,jacobian)
22843  * self.adr.calculateJacobian(#element
22844  * self.u[0].femSpace.elementMaps.psi, # <<<<<<<<<<<<<<
22845  * self.u[0].femSpace.elementMaps.grad_psi,
22846  * self.mesh.nodeArray,
22847  */
22848  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L1_error)
22849  __Pyx_GOTREF(__pyx_t_3);
22850  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error)
22851  __Pyx_GOTREF(__pyx_t_2);
22852  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22853  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L1_error)
22854  __Pyx_GOTREF(__pyx_t_3);
22855  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22856  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error)
22857  __Pyx_GOTREF(__pyx_t_2);
22858  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22859  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_psi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L1_error)
22860  __Pyx_GOTREF(__pyx_t_3);
22861  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22862 
22863  /* "ADR.pyx":1016
22864  * self.adr.calculateJacobian(#element
22865  * self.u[0].femSpace.elementMaps.psi,
22866  * self.u[0].femSpace.elementMaps.grad_psi, # <<<<<<<<<<<<<<
22867  * self.mesh.nodeArray,
22868  * self.mesh.elementNodesArray,
22869  */
22870  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
22871  __Pyx_GOTREF(__pyx_t_2);
22872  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1016, __pyx_L1_error)
22873  __Pyx_GOTREF(__pyx_t_4);
22874  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22875  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
22876  __Pyx_GOTREF(__pyx_t_2);
22877  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22878  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1016, __pyx_L1_error)
22879  __Pyx_GOTREF(__pyx_t_4);
22880  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22881  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
22882  __Pyx_GOTREF(__pyx_t_2);
22883  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22884 
22885  /* "ADR.pyx":1017
22886  * self.u[0].femSpace.elementMaps.psi,
22887  * self.u[0].femSpace.elementMaps.grad_psi,
22888  * self.mesh.nodeArray, # <<<<<<<<<<<<<<
22889  * self.mesh.elementNodesArray,
22890  * self.elementQuadratureWeights[('u',0)],
22891  */
22892  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
22893  __Pyx_GOTREF(__pyx_t_4);
22894  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1017, __pyx_L1_error)
22895  __Pyx_GOTREF(__pyx_t_7);
22896  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22897 
22898  /* "ADR.pyx":1018
22899  * self.u[0].femSpace.elementMaps.grad_psi,
22900  * self.mesh.nodeArray,
22901  * self.mesh.elementNodesArray, # <<<<<<<<<<<<<<
22902  * self.elementQuadratureWeights[('u',0)],
22903  * self.u[0].femSpace.psi,
22904  */
22905  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1018, __pyx_L1_error)
22906  __Pyx_GOTREF(__pyx_t_4);
22907  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1018, __pyx_L1_error)
22908  __Pyx_GOTREF(__pyx_t_8);
22909  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22910 
22911  /* "ADR.pyx":1019
22912  * self.mesh.nodeArray,
22913  * self.mesh.elementNodesArray,
22914  * self.elementQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
22915  * self.u[0].femSpace.psi,
22916  * self.u[0].femSpace.grad_psi,
22917  */
22918  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureWeights); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1019, __pyx_L1_error)
22919  __Pyx_GOTREF(__pyx_t_4);
22920  __pyx_t_9 = PyObject_GetItem(__pyx_t_4, __pyx_tuple__74); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1019, __pyx_L1_error)
22921  __Pyx_GOTREF(__pyx_t_9);
22922  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22923 
22924  /* "ADR.pyx":1020
22925  * self.mesh.elementNodesArray,
22926  * self.elementQuadratureWeights[('u',0)],
22927  * self.u[0].femSpace.psi, # <<<<<<<<<<<<<<
22928  * self.u[0].femSpace.grad_psi,
22929  * self.u[0].femSpace.psi,
22930  */
22931  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1020, __pyx_L1_error)
22932  __Pyx_GOTREF(__pyx_t_4);
22933  __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1020, __pyx_L1_error)
22934  __Pyx_GOTREF(__pyx_t_10);
22935  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22936  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1020, __pyx_L1_error)
22937  __Pyx_GOTREF(__pyx_t_4);
22938  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
22939  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_psi); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1020, __pyx_L1_error)
22940  __Pyx_GOTREF(__pyx_t_10);
22941  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22942 
22943  /* "ADR.pyx":1021
22944  * self.elementQuadratureWeights[('u',0)],
22945  * self.u[0].femSpace.psi,
22946  * self.u[0].femSpace.grad_psi, # <<<<<<<<<<<<<<
22947  * self.u[0].femSpace.psi,
22948  * self.u[0].femSpace.grad_psi,
22949  */
22950  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
22951  __Pyx_GOTREF(__pyx_t_4);
22952  __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1021, __pyx_L1_error)
22953  __Pyx_GOTREF(__pyx_t_11);
22954  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22955  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
22956  __Pyx_GOTREF(__pyx_t_4);
22957  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
22958  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1021, __pyx_L1_error)
22959  __Pyx_GOTREF(__pyx_t_11);
22960  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22961 
22962  /* "ADR.pyx":1022
22963  * self.u[0].femSpace.psi,
22964  * self.u[0].femSpace.grad_psi,
22965  * self.u[0].femSpace.psi, # <<<<<<<<<<<<<<
22966  * self.u[0].femSpace.grad_psi,
22967  * self.mesh.elementDiametersArray,
22968  */
22969  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error)
22970  __Pyx_GOTREF(__pyx_t_4);
22971  __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1022, __pyx_L1_error)
22972  __Pyx_GOTREF(__pyx_t_12);
22973  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22974  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error)
22975  __Pyx_GOTREF(__pyx_t_4);
22976  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
22977  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_psi); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1022, __pyx_L1_error)
22978  __Pyx_GOTREF(__pyx_t_12);
22979  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22980 
22981  /* "ADR.pyx":1023
22982  * self.u[0].femSpace.grad_psi,
22983  * self.u[0].femSpace.psi,
22984  * self.u[0].femSpace.grad_psi, # <<<<<<<<<<<<<<
22985  * self.mesh.elementDiametersArray,
22986  * self.q[('cfl',0)],
22987  */
22988  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __pyx_L1_error)
22989  __Pyx_GOTREF(__pyx_t_4);
22990  __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1023, __pyx_L1_error)
22991  __Pyx_GOTREF(__pyx_t_13);
22992  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22993  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __pyx_L1_error)
22994  __Pyx_GOTREF(__pyx_t_4);
22995  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
22996  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1023, __pyx_L1_error)
22997  __Pyx_GOTREF(__pyx_t_13);
22998  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22999 
23000  /* "ADR.pyx":1024
23001  * self.u[0].femSpace.psi,
23002  * self.u[0].femSpace.grad_psi,
23003  * self.mesh.elementDiametersArray, # <<<<<<<<<<<<<<
23004  * self.q[('cfl',0)],
23005  * self.shockCapturing.shockCapturingFactor,
23006  */
23007  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1024, __pyx_L1_error)
23008  __Pyx_GOTREF(__pyx_t_4);
23009  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_elementDiametersArray); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1024, __pyx_L1_error)
23010  __Pyx_GOTREF(__pyx_t_14);
23011  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23012 
23013  /* "ADR.pyx":1025
23014  * self.u[0].femSpace.grad_psi,
23015  * self.mesh.elementDiametersArray,
23016  * self.q[('cfl',0)], # <<<<<<<<<<<<<<
23017  * self.shockCapturing.shockCapturingFactor,
23018  * self.coefficients.sc_uref,
23019  */
23020  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1025, __pyx_L1_error)
23021  __Pyx_GOTREF(__pyx_t_4);
23022  __pyx_t_15 = PyObject_GetItem(__pyx_t_4, __pyx_tuple__75); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1025, __pyx_L1_error)
23023  __Pyx_GOTREF(__pyx_t_15);
23024  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23025 
23026  /* "ADR.pyx":1026
23027  * self.mesh.elementDiametersArray,
23028  * self.q[('cfl',0)],
23029  * self.shockCapturing.shockCapturingFactor, # <<<<<<<<<<<<<<
23030  * self.coefficients.sc_uref,
23031  * self.coefficients.sc_beta,
23032  */
23033  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1026, __pyx_L1_error)
23034  __Pyx_GOTREF(__pyx_t_4);
23035  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_shockCapturingFactor); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1026, __pyx_L1_error)
23036  __Pyx_GOTREF(__pyx_t_16);
23037  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23038 
23039  /* "ADR.pyx":1027
23040  * self.q[('cfl',0)],
23041  * self.shockCapturing.shockCapturingFactor,
23042  * self.coefficients.sc_uref, # <<<<<<<<<<<<<<
23043  * self.coefficients.sc_beta,
23044  * self.coefficients.useMetrics,
23045  */
23046  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L1_error)
23047  __Pyx_GOTREF(__pyx_t_4);
23048  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sc_uref); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1027, __pyx_L1_error)
23049  __Pyx_GOTREF(__pyx_t_17);
23050  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23051 
23052  /* "ADR.pyx":1028
23053  * self.shockCapturing.shockCapturingFactor,
23054  * self.coefficients.sc_uref,
23055  * self.coefficients.sc_beta, # <<<<<<<<<<<<<<
23056  * self.coefficients.useMetrics,
23057  * #element boundary
23058  */
23059  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error)
23060  __Pyx_GOTREF(__pyx_t_4);
23061  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sc_beta); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1028, __pyx_L1_error)
23062  __Pyx_GOTREF(__pyx_t_18);
23063  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23064 
23065  /* "ADR.pyx":1029
23066  * self.coefficients.sc_uref,
23067  * self.coefficients.sc_beta,
23068  * self.coefficients.useMetrics, # <<<<<<<<<<<<<<
23069  * #element boundary
23070  * self.u[0].femSpace.elementMaps.psi_trace,
23071  */
23072  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
23073  __Pyx_GOTREF(__pyx_t_4);
23074  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_useMetrics); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1029, __pyx_L1_error)
23075  __Pyx_GOTREF(__pyx_t_19);
23076  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23077 
23078  /* "ADR.pyx":1031
23079  * self.coefficients.useMetrics,
23080  * #element boundary
23081  * self.u[0].femSpace.elementMaps.psi_trace, # <<<<<<<<<<<<<<
23082  * self.u[0].femSpace.elementMaps.grad_psi_trace,
23083  * self.elementBoundaryQuadratureWeights[('u',0)],
23084  */
23085  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
23086  __Pyx_GOTREF(__pyx_t_4);
23087  __pyx_t_20 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1031, __pyx_L1_error)
23088  __Pyx_GOTREF(__pyx_t_20);
23089  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23090  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
23091  __Pyx_GOTREF(__pyx_t_4);
23092  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23093  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1031, __pyx_L1_error)
23094  __Pyx_GOTREF(__pyx_t_20);
23095  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23096  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
23097  __Pyx_GOTREF(__pyx_t_4);
23098  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23099 
23100  /* "ADR.pyx":1032
23101  * #element boundary
23102  * self.u[0].femSpace.elementMaps.psi_trace,
23103  * self.u[0].femSpace.elementMaps.grad_psi_trace, # <<<<<<<<<<<<<<
23104  * self.elementBoundaryQuadratureWeights[('u',0)],
23105  * self.u[0].femSpace.psi_trace,
23106  */
23107  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1032, __pyx_L1_error)
23108  __Pyx_GOTREF(__pyx_t_20);
23109  __pyx_t_21 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1032, __pyx_L1_error)
23110  __Pyx_GOTREF(__pyx_t_21);
23111  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23112  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1032, __pyx_L1_error)
23113  __Pyx_GOTREF(__pyx_t_20);
23114  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23115  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1032, __pyx_L1_error)
23116  __Pyx_GOTREF(__pyx_t_21);
23117  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23118  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1032, __pyx_L1_error)
23119  __Pyx_GOTREF(__pyx_t_20);
23120  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23121 
23122  /* "ADR.pyx":1033
23123  * self.u[0].femSpace.elementMaps.psi_trace,
23124  * self.u[0].femSpace.elementMaps.grad_psi_trace,
23125  * self.elementBoundaryQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
23126  * self.u[0].femSpace.psi_trace,
23127  * self.u[0].femSpace.grad_psi_trace,
23128  */
23129  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureWeights); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1033, __pyx_L1_error)
23130  __Pyx_GOTREF(__pyx_t_21);
23131  __pyx_t_22 = PyObject_GetItem(__pyx_t_21, __pyx_tuple__76); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1033, __pyx_L1_error)
23132  __Pyx_GOTREF(__pyx_t_22);
23133  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23134 
23135  /* "ADR.pyx":1034
23136  * self.u[0].femSpace.elementMaps.grad_psi_trace,
23137  * self.elementBoundaryQuadratureWeights[('u',0)],
23138  * self.u[0].femSpace.psi_trace, # <<<<<<<<<<<<<<
23139  * self.u[0].femSpace.grad_psi_trace,
23140  * self.u[0].femSpace.psi_trace,
23141  */
23142  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1034, __pyx_L1_error)
23143  __Pyx_GOTREF(__pyx_t_21);
23144  __pyx_t_23 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1034, __pyx_L1_error)
23145  __Pyx_GOTREF(__pyx_t_23);
23146  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23147  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1034, __pyx_L1_error)
23148  __Pyx_GOTREF(__pyx_t_21);
23149  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
23150  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1034, __pyx_L1_error)
23151  __Pyx_GOTREF(__pyx_t_23);
23152  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23153 
23154  /* "ADR.pyx":1035
23155  * self.elementBoundaryQuadratureWeights[('u',0)],
23156  * self.u[0].femSpace.psi_trace,
23157  * self.u[0].femSpace.grad_psi_trace, # <<<<<<<<<<<<<<
23158  * self.u[0].femSpace.psi_trace,
23159  * self.u[0].femSpace.grad_psi_trace,
23160  */
23161  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1035, __pyx_L1_error)
23162  __Pyx_GOTREF(__pyx_t_21);
23163  __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1035, __pyx_L1_error)
23164  __Pyx_GOTREF(__pyx_t_24);
23165  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23166  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1035, __pyx_L1_error)
23167  __Pyx_GOTREF(__pyx_t_21);
23168  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
23169  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1035, __pyx_L1_error)
23170  __Pyx_GOTREF(__pyx_t_24);
23171  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23172 
23173  /* "ADR.pyx":1036
23174  * self.u[0].femSpace.psi_trace,
23175  * self.u[0].femSpace.grad_psi_trace,
23176  * self.u[0].femSpace.psi_trace, # <<<<<<<<<<<<<<
23177  * self.u[0].femSpace.grad_psi_trace,
23178  * self.u[0].femSpace.elementMaps.boundaryNormals,
23179  */
23180  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1036, __pyx_L1_error)
23181  __Pyx_GOTREF(__pyx_t_21);
23182  __pyx_t_25 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1036, __pyx_L1_error)
23183  __Pyx_GOTREF(__pyx_t_25);
23184  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23185  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1036, __pyx_L1_error)
23186  __Pyx_GOTREF(__pyx_t_21);
23187  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
23188  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1036, __pyx_L1_error)
23189  __Pyx_GOTREF(__pyx_t_25);
23190  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23191 
23192  /* "ADR.pyx":1037
23193  * self.u[0].femSpace.grad_psi_trace,
23194  * self.u[0].femSpace.psi_trace,
23195  * self.u[0].femSpace.grad_psi_trace, # <<<<<<<<<<<<<<
23196  * self.u[0].femSpace.elementMaps.boundaryNormals,
23197  * self.u[0].femSpace.elementMaps.boundaryJacobians,
23198  */
23199  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1037, __pyx_L1_error)
23200  __Pyx_GOTREF(__pyx_t_21);
23201  __pyx_t_26 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1037, __pyx_L1_error)
23202  __Pyx_GOTREF(__pyx_t_26);
23203  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23204  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1037, __pyx_L1_error)
23205  __Pyx_GOTREF(__pyx_t_21);
23206  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
23207  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1037, __pyx_L1_error)
23208  __Pyx_GOTREF(__pyx_t_26);
23209  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23210 
23211  /* "ADR.pyx":1038
23212  * self.u[0].femSpace.psi_trace,
23213  * self.u[0].femSpace.grad_psi_trace,
23214  * self.u[0].femSpace.elementMaps.boundaryNormals, # <<<<<<<<<<<<<<
23215  * self.u[0].femSpace.elementMaps.boundaryJacobians,
23216  * self.mesh.nElements_global,
23217  */
23218  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1038, __pyx_L1_error)
23219  __Pyx_GOTREF(__pyx_t_21);
23220  __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1038, __pyx_L1_error)
23221  __Pyx_GOTREF(__pyx_t_27);
23222  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23223  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1038, __pyx_L1_error)
23224  __Pyx_GOTREF(__pyx_t_21);
23225  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23226  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1038, __pyx_L1_error)
23227  __Pyx_GOTREF(__pyx_t_27);
23228  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23229  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_boundaryNormals); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1038, __pyx_L1_error)
23230  __Pyx_GOTREF(__pyx_t_21);
23231  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23232 
23233  /* "ADR.pyx":1039
23234  * self.u[0].femSpace.grad_psi_trace,
23235  * self.u[0].femSpace.elementMaps.boundaryNormals,
23236  * self.u[0].femSpace.elementMaps.boundaryJacobians, # <<<<<<<<<<<<<<
23237  * self.mesh.nElements_global,
23238  * self.u[0].femSpace.dofMap.l2g,
23239  */
23240  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1039, __pyx_L1_error)
23241  __Pyx_GOTREF(__pyx_t_27);
23242  __pyx_t_28 = __Pyx_GetItemInt(__pyx_t_27, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1039, __pyx_L1_error)
23243  __Pyx_GOTREF(__pyx_t_28);
23244  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23245  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1039, __pyx_L1_error)
23246  __Pyx_GOTREF(__pyx_t_27);
23247  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23248  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1039, __pyx_L1_error)
23249  __Pyx_GOTREF(__pyx_t_28);
23250  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23251  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_boundaryJacobians); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1039, __pyx_L1_error)
23252  __Pyx_GOTREF(__pyx_t_27);
23253  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23254 
23255  /* "ADR.pyx":1040
23256  * self.u[0].femSpace.elementMaps.boundaryNormals,
23257  * self.u[0].femSpace.elementMaps.boundaryJacobians,
23258  * self.mesh.nElements_global, # <<<<<<<<<<<<<<
23259  * self.u[0].femSpace.dofMap.l2g,
23260  * self.u[0].dof,
23261  */
23262  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1040, __pyx_L1_error)
23263  __Pyx_GOTREF(__pyx_t_28);
23264  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1040, __pyx_L1_error)
23265  __Pyx_GOTREF(__pyx_t_29);
23266  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23267 
23268  /* "ADR.pyx":1041
23269  * self.u[0].femSpace.elementMaps.boundaryJacobians,
23270  * self.mesh.nElements_global,
23271  * self.u[0].femSpace.dofMap.l2g, # <<<<<<<<<<<<<<
23272  * self.u[0].dof,
23273  * self.coefficients.sdInfo[(0,0)][0],
23274  */
23275  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1041, __pyx_L1_error)
23276  __Pyx_GOTREF(__pyx_t_28);
23277  __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_28, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1041, __pyx_L1_error)
23278  __Pyx_GOTREF(__pyx_t_30);
23279  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23280  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1041, __pyx_L1_error)
23281  __Pyx_GOTREF(__pyx_t_28);
23282  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
23283  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_dofMap); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1041, __pyx_L1_error)
23284  __Pyx_GOTREF(__pyx_t_30);
23285  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23286  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_l2g); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1041, __pyx_L1_error)
23287  __Pyx_GOTREF(__pyx_t_28);
23288  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
23289 
23290  /* "ADR.pyx":1042
23291  * self.mesh.nElements_global,
23292  * self.u[0].femSpace.dofMap.l2g,
23293  * self.u[0].dof, # <<<<<<<<<<<<<<
23294  * self.coefficients.sdInfo[(0,0)][0],
23295  * self.coefficients.sdInfo[(0,0)][1],
23296  */
23297  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1042, __pyx_L1_error)
23298  __Pyx_GOTREF(__pyx_t_30);
23299  __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_30, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1042, __pyx_L1_error)
23300  __Pyx_GOTREF(__pyx_t_31);
23301  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
23302  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_dof); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1042, __pyx_L1_error)
23303  __Pyx_GOTREF(__pyx_t_30);
23304  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23305 
23306  /* "ADR.pyx":1043
23307  * self.u[0].femSpace.dofMap.l2g,
23308  * self.u[0].dof,
23309  * self.coefficients.sdInfo[(0,0)][0], # <<<<<<<<<<<<<<
23310  * self.coefficients.sdInfo[(0,0)][1],
23311  * self.q[('a',0,0)],
23312  */
23313  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1043, __pyx_L1_error)
23314  __Pyx_GOTREF(__pyx_t_31);
23315  __pyx_t_32 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 1043, __pyx_L1_error)
23316  __Pyx_GOTREF(__pyx_t_32);
23317  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23318  __pyx_t_31 = PyObject_GetItem(__pyx_t_32, __pyx_tuple__77); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1043, __pyx_L1_error)
23319  __Pyx_GOTREF(__pyx_t_31);
23320  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
23321  __pyx_t_32 = __Pyx_GetItemInt(__pyx_t_31, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 1043, __pyx_L1_error)
23322  __Pyx_GOTREF(__pyx_t_32);
23323  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23324 
23325  /* "ADR.pyx":1044
23326  * self.u[0].dof,
23327  * self.coefficients.sdInfo[(0,0)][0],
23328  * self.coefficients.sdInfo[(0,0)][1], # <<<<<<<<<<<<<<
23329  * self.q[('a',0,0)],
23330  * self.q[('df',0,0)],
23331  */
23332  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1044, __pyx_L1_error)
23333  __Pyx_GOTREF(__pyx_t_31);
23334  __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 1044, __pyx_L1_error)
23335  __Pyx_GOTREF(__pyx_t_33);
23336  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23337  __pyx_t_31 = PyObject_GetItem(__pyx_t_33, __pyx_tuple__78); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1044, __pyx_L1_error)
23338  __Pyx_GOTREF(__pyx_t_31);
23339  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
23340  __pyx_t_33 = __Pyx_GetItemInt(__pyx_t_31, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 1044, __pyx_L1_error)
23341  __Pyx_GOTREF(__pyx_t_33);
23342  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23343 
23344  /* "ADR.pyx":1045
23345  * self.coefficients.sdInfo[(0,0)][0],
23346  * self.coefficients.sdInfo[(0,0)][1],
23347  * self.q[('a',0,0)], # <<<<<<<<<<<<<<
23348  * self.q[('df',0,0)],
23349  * self.q[('r',0)],
23350  */
23351  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1045, __pyx_L1_error)
23352  __Pyx_GOTREF(__pyx_t_31);
23353  __pyx_t_34 = PyObject_GetItem(__pyx_t_31, __pyx_tuple__79); if (unlikely(!__pyx_t_34)) __PYX_ERR(0, 1045, __pyx_L1_error)
23354  __Pyx_GOTREF(__pyx_t_34);
23355  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23356 
23357  /* "ADR.pyx":1046
23358  * self.coefficients.sdInfo[(0,0)][1],
23359  * self.q[('a',0,0)],
23360  * self.q[('df',0,0)], # <<<<<<<<<<<<<<
23361  * self.q[('r',0)],
23362  * self.shockCapturing.lag,
23363  */
23364  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1046, __pyx_L1_error)
23365  __Pyx_GOTREF(__pyx_t_31);
23366  __pyx_t_35 = PyObject_GetItem(__pyx_t_31, __pyx_tuple__80); if (unlikely(!__pyx_t_35)) __PYX_ERR(0, 1046, __pyx_L1_error)
23367  __Pyx_GOTREF(__pyx_t_35);
23368  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23369 
23370  /* "ADR.pyx":1047
23371  * self.q[('a',0,0)],
23372  * self.q[('df',0,0)],
23373  * self.q[('r',0)], # <<<<<<<<<<<<<<
23374  * self.shockCapturing.lag,
23375  * self.shockCapturing.shockCapturingFactor,
23376  */
23377  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1047, __pyx_L1_error)
23378  __Pyx_GOTREF(__pyx_t_31);
23379  __pyx_t_36 = PyObject_GetItem(__pyx_t_31, __pyx_tuple__81); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 1047, __pyx_L1_error)
23380  __Pyx_GOTREF(__pyx_t_36);
23381  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23382 
23383  /* "ADR.pyx":1048
23384  * self.q[('df',0,0)],
23385  * self.q[('r',0)],
23386  * self.shockCapturing.lag, # <<<<<<<<<<<<<<
23387  * self.shockCapturing.shockCapturingFactor,
23388  * self.shockCapturing.numDiff[0],
23389  */
23390  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1048, __pyx_L1_error)
23391  __Pyx_GOTREF(__pyx_t_31);
23392  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_lag); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 1048, __pyx_L1_error)
23393  __Pyx_GOTREF(__pyx_t_37);
23394  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23395 
23396  /* "ADR.pyx":1049
23397  * self.q[('r',0)],
23398  * self.shockCapturing.lag,
23399  * self.shockCapturing.shockCapturingFactor, # <<<<<<<<<<<<<<
23400  * self.shockCapturing.numDiff[0],
23401  * self.shockCapturing.numDiff_last[0],
23402  */
23403  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1049, __pyx_L1_error)
23404  __Pyx_GOTREF(__pyx_t_31);
23405  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_shockCapturingFactor); if (unlikely(!__pyx_t_38)) __PYX_ERR(0, 1049, __pyx_L1_error)
23406  __Pyx_GOTREF(__pyx_t_38);
23407  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23408 
23409  /* "ADR.pyx":1050
23410  * self.shockCapturing.lag,
23411  * self.shockCapturing.shockCapturingFactor,
23412  * self.shockCapturing.numDiff[0], # <<<<<<<<<<<<<<
23413  * self.shockCapturing.numDiff_last[0],
23414  * self.csrRowIndeces[(0,0)],
23415  */
23416  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1050, __pyx_L1_error)
23417  __Pyx_GOTREF(__pyx_t_31);
23418  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 1050, __pyx_L1_error)
23419  __Pyx_GOTREF(__pyx_t_39);
23420  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23421  __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_39, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1050, __pyx_L1_error)
23422  __Pyx_GOTREF(__pyx_t_31);
23423  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
23424 
23425  /* "ADR.pyx":1051
23426  * self.shockCapturing.shockCapturingFactor,
23427  * self.shockCapturing.numDiff[0],
23428  * self.shockCapturing.numDiff_last[0], # <<<<<<<<<<<<<<
23429  * self.csrRowIndeces[(0,0)],
23430  * self.csrColumnOffsets[(0,0)],
23431  */
23432  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 1051, __pyx_L1_error)
23433  __Pyx_GOTREF(__pyx_t_39);
23434  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1051, __pyx_L1_error)
23435  __Pyx_GOTREF(__pyx_t_40);
23436  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
23437  __pyx_t_39 = __Pyx_GetItemInt(__pyx_t_40, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 1051, __pyx_L1_error)
23438  __Pyx_GOTREF(__pyx_t_39);
23439  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23440 
23441  /* "ADR.pyx":1052
23442  * self.shockCapturing.numDiff[0],
23443  * self.shockCapturing.numDiff_last[0],
23444  * self.csrRowIndeces[(0,0)], # <<<<<<<<<<<<<<
23445  * self.csrColumnOffsets[(0,0)],
23446  * jacobian,
23447  */
23448  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_csrRowIndeces); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1052, __pyx_L1_error)
23449  __Pyx_GOTREF(__pyx_t_40);
23450  __pyx_t_41 = PyObject_GetItem(__pyx_t_40, __pyx_tuple__82); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1052, __pyx_L1_error)
23451  __Pyx_GOTREF(__pyx_t_41);
23452  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23453 
23454  /* "ADR.pyx":1053
23455  * self.shockCapturing.numDiff_last[0],
23456  * self.csrRowIndeces[(0,0)],
23457  * self.csrColumnOffsets[(0,0)], # <<<<<<<<<<<<<<
23458  * jacobian,
23459  * self.mesh.nExteriorElementBoundaries_global,
23460  */
23461  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_csrColumnOffsets); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1053, __pyx_L1_error)
23462  __Pyx_GOTREF(__pyx_t_40);
23463  __pyx_t_42 = PyObject_GetItem(__pyx_t_40, __pyx_tuple__83); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 1053, __pyx_L1_error)
23464  __Pyx_GOTREF(__pyx_t_42);
23465  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23466 
23467  /* "ADR.pyx":1055
23468  * self.csrColumnOffsets[(0,0)],
23469  * jacobian,
23470  * self.mesh.nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
23471  * self.mesh.exteriorElementBoundariesArray,
23472  * self.mesh.elementBoundaryElementsArray,
23473  */
23474  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1055, __pyx_L1_error)
23475  __Pyx_GOTREF(__pyx_t_40);
23476  __pyx_t_43 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 1055, __pyx_L1_error)
23477  __Pyx_GOTREF(__pyx_t_43);
23478  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23479 
23480  /* "ADR.pyx":1056
23481  * jacobian,
23482  * self.mesh.nExteriorElementBoundaries_global,
23483  * self.mesh.exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
23484  * self.mesh.elementBoundaryElementsArray,
23485  * self.mesh.elementBoundaryLocalElementBoundariesArray,
23486  */
23487  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1056, __pyx_L1_error)
23488  __Pyx_GOTREF(__pyx_t_40);
23489  __pyx_t_44 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_44)) __PYX_ERR(0, 1056, __pyx_L1_error)
23490  __Pyx_GOTREF(__pyx_t_44);
23491  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23492 
23493  /* "ADR.pyx":1057
23494  * self.mesh.nExteriorElementBoundaries_global,
23495  * self.mesh.exteriorElementBoundariesArray,
23496  * self.mesh.elementBoundaryElementsArray, # <<<<<<<<<<<<<<
23497  * self.mesh.elementBoundaryLocalElementBoundariesArray,
23498  * self.ebqe[('a',0,0)],
23499  */
23500  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1057, __pyx_L1_error)
23501  __Pyx_GOTREF(__pyx_t_40);
23502  __pyx_t_45 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_elementBoundaryElementsArray); if (unlikely(!__pyx_t_45)) __PYX_ERR(0, 1057, __pyx_L1_error)
23503  __Pyx_GOTREF(__pyx_t_45);
23504  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23505 
23506  /* "ADR.pyx":1058
23507  * self.mesh.exteriorElementBoundariesArray,
23508  * self.mesh.elementBoundaryElementsArray,
23509  * self.mesh.elementBoundaryLocalElementBoundariesArray, # <<<<<<<<<<<<<<
23510  * self.ebqe[('a',0,0)],
23511  * self.ebqe[('df',0,0)],
23512  */
23513  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1058, __pyx_L1_error)
23514  __Pyx_GOTREF(__pyx_t_40);
23515  __pyx_t_46 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_elementBoundaryLocalElementBound); if (unlikely(!__pyx_t_46)) __PYX_ERR(0, 1058, __pyx_L1_error)
23516  __Pyx_GOTREF(__pyx_t_46);
23517  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23518 
23519  /* "ADR.pyx":1059
23520  * self.mesh.elementBoundaryElementsArray,
23521  * self.mesh.elementBoundaryLocalElementBoundariesArray,
23522  * self.ebqe[('a',0,0)], # <<<<<<<<<<<<<<
23523  * self.ebqe[('df',0,0)],
23524  * self.numericalFlux.isDOFBoundary[0],
23525  */
23526  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1059, __pyx_L1_error)
23527  __Pyx_GOTREF(__pyx_t_40);
23528  __pyx_t_47 = PyObject_GetItem(__pyx_t_40, __pyx_tuple__84); if (unlikely(!__pyx_t_47)) __PYX_ERR(0, 1059, __pyx_L1_error)
23529  __Pyx_GOTREF(__pyx_t_47);
23530  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23531 
23532  /* "ADR.pyx":1060
23533  * self.mesh.elementBoundaryLocalElementBoundariesArray,
23534  * self.ebqe[('a',0,0)],
23535  * self.ebqe[('df',0,0)], # <<<<<<<<<<<<<<
23536  * self.numericalFlux.isDOFBoundary[0],
23537  * self.numericalFlux.ebqe[('u',0)],
23538  */
23539  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1060, __pyx_L1_error)
23540  __Pyx_GOTREF(__pyx_t_40);
23541  __pyx_t_48 = PyObject_GetItem(__pyx_t_40, __pyx_tuple__85); if (unlikely(!__pyx_t_48)) __PYX_ERR(0, 1060, __pyx_L1_error)
23542  __Pyx_GOTREF(__pyx_t_48);
23543  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23544 
23545  /* "ADR.pyx":1061
23546  * self.ebqe[('a',0,0)],
23547  * self.ebqe[('df',0,0)],
23548  * self.numericalFlux.isDOFBoundary[0], # <<<<<<<<<<<<<<
23549  * self.numericalFlux.ebqe[('u',0)],
23550  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
23551  */
23552  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1061, __pyx_L1_error)
23553  __Pyx_GOTREF(__pyx_t_40);
23554  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_isDOFBoundary); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1061, __pyx_L1_error)
23555  __Pyx_GOTREF(__pyx_t_49);
23556  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23557  __pyx_t_40 = __Pyx_GetItemInt(__pyx_t_49, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1061, __pyx_L1_error)
23558  __Pyx_GOTREF(__pyx_t_40);
23559  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
23560 
23561  /* "ADR.pyx":1062
23562  * self.ebqe[('df',0,0)],
23563  * self.numericalFlux.isDOFBoundary[0],
23564  * self.numericalFlux.ebqe[('u',0)], # <<<<<<<<<<<<<<
23565  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
23566  * self.ebqe[('advectiveFlux_bc_flag',0)],
23567  */
23568  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1062, __pyx_L1_error)
23569  __Pyx_GOTREF(__pyx_t_49);
23570  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_t_49, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1062, __pyx_L1_error)
23571  __Pyx_GOTREF(__pyx_t_50);
23572  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
23573  __pyx_t_49 = PyObject_GetItem(__pyx_t_50, __pyx_tuple__86); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1062, __pyx_L1_error)
23574  __Pyx_GOTREF(__pyx_t_49);
23575  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23576 
23577  /* "ADR.pyx":1063
23578  * self.numericalFlux.isDOFBoundary[0],
23579  * self.numericalFlux.ebqe[('u',0)],
23580  * self.ebqe[('diffusiveFlux_bc_flag',0,0)], # <<<<<<<<<<<<<<
23581  * self.ebqe[('advectiveFlux_bc_flag',0)],
23582  * self.ebqe[('diffusiveFlux_bc',0,0)],
23583  */
23584  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1063, __pyx_L1_error)
23585  __Pyx_GOTREF(__pyx_t_50);
23586  __pyx_t_51 = PyObject_GetItem(__pyx_t_50, __pyx_tuple__87); if (unlikely(!__pyx_t_51)) __PYX_ERR(0, 1063, __pyx_L1_error)
23587  __Pyx_GOTREF(__pyx_t_51);
23588  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23589 
23590  /* "ADR.pyx":1064
23591  * self.numericalFlux.ebqe[('u',0)],
23592  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
23593  * self.ebqe[('advectiveFlux_bc_flag',0)], # <<<<<<<<<<<<<<
23594  * self.ebqe[('diffusiveFlux_bc',0,0)],
23595  * self.ebqe[('advectiveFlux_bc',0)],
23596  */
23597  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1064, __pyx_L1_error)
23598  __Pyx_GOTREF(__pyx_t_50);
23599  __pyx_t_52 = PyObject_GetItem(__pyx_t_50, __pyx_tuple__88); if (unlikely(!__pyx_t_52)) __PYX_ERR(0, 1064, __pyx_L1_error)
23600  __Pyx_GOTREF(__pyx_t_52);
23601  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23602 
23603  /* "ADR.pyx":1065
23604  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
23605  * self.ebqe[('advectiveFlux_bc_flag',0)],
23606  * self.ebqe[('diffusiveFlux_bc',0,0)], # <<<<<<<<<<<<<<
23607  * self.ebqe[('advectiveFlux_bc',0)],
23608  * self.csrColumnOffsets_eb[(0,0)],
23609  */
23610  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1065, __pyx_L1_error)
23611  __Pyx_GOTREF(__pyx_t_50);
23612  __pyx_t_53 = PyObject_GetItem(__pyx_t_50, __pyx_tuple__89); if (unlikely(!__pyx_t_53)) __PYX_ERR(0, 1065, __pyx_L1_error)
23613  __Pyx_GOTREF(__pyx_t_53);
23614  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23615 
23616  /* "ADR.pyx":1066
23617  * self.ebqe[('advectiveFlux_bc_flag',0)],
23618  * self.ebqe[('diffusiveFlux_bc',0,0)],
23619  * self.ebqe[('advectiveFlux_bc',0)], # <<<<<<<<<<<<<<
23620  * self.csrColumnOffsets_eb[(0,0)],
23621  * self.ebqe['penalty'],
23622  */
23623  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1066, __pyx_L1_error)
23624  __Pyx_GOTREF(__pyx_t_50);
23625  __pyx_t_54 = PyObject_GetItem(__pyx_t_50, __pyx_tuple__90); if (unlikely(!__pyx_t_54)) __PYX_ERR(0, 1066, __pyx_L1_error)
23626  __Pyx_GOTREF(__pyx_t_54);
23627  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23628 
23629  /* "ADR.pyx":1067
23630  * self.ebqe[('diffusiveFlux_bc',0,0)],
23631  * self.ebqe[('advectiveFlux_bc',0)],
23632  * self.csrColumnOffsets_eb[(0,0)], # <<<<<<<<<<<<<<
23633  * self.ebqe['penalty'],
23634  * self.numericalFlux.boundaryAdjoint_sigma)
23635  */
23636  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_csrColumnOffsets_eb); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1067, __pyx_L1_error)
23637  __Pyx_GOTREF(__pyx_t_50);
23638  __pyx_t_55 = PyObject_GetItem(__pyx_t_50, __pyx_tuple__91); if (unlikely(!__pyx_t_55)) __PYX_ERR(0, 1067, __pyx_L1_error)
23639  __Pyx_GOTREF(__pyx_t_55);
23640  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23641 
23642  /* "ADR.pyx":1068
23643  * self.ebqe[('advectiveFlux_bc',0)],
23644  * self.csrColumnOffsets_eb[(0,0)],
23645  * self.ebqe['penalty'], # <<<<<<<<<<<<<<
23646  * self.numericalFlux.boundaryAdjoint_sigma)
23647  * log("Jacobian ",level=10,data=jacobian)
23648  */
23649  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1068, __pyx_L1_error)
23650  __Pyx_GOTREF(__pyx_t_50);
23651  __pyx_t_56 = PyObject_GetItem(__pyx_t_50, __pyx_n_s_penalty); if (unlikely(!__pyx_t_56)) __PYX_ERR(0, 1068, __pyx_L1_error)
23652  __Pyx_GOTREF(__pyx_t_56);
23653  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23654 
23655  /* "ADR.pyx":1069
23656  * self.csrColumnOffsets_eb[(0,0)],
23657  * self.ebqe['penalty'],
23658  * self.numericalFlux.boundaryAdjoint_sigma) # <<<<<<<<<<<<<<
23659  * log("Jacobian ",level=10,data=jacobian)
23660  * #mwf decide if this is reasonable for solver statistics
23661  */
23662  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1069, __pyx_L1_error)
23663  __Pyx_GOTREF(__pyx_t_50);
23664  __pyx_t_57 = __Pyx_PyObject_GetAttrStr(__pyx_t_50, __pyx_n_s_boundaryAdjoint_sigma); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1069, __pyx_L1_error)
23665  __Pyx_GOTREF(__pyx_t_57);
23666  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23667  __pyx_t_50 = NULL;
23668  __pyx_t_5 = 0;
23669  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
23670  __pyx_t_50 = PyMethod_GET_SELF(__pyx_t_6);
23671  if (likely(__pyx_t_50)) {
23672  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
23673  __Pyx_INCREF(__pyx_t_50);
23674  __Pyx_INCREF(function);
23675  __Pyx_DECREF_SET(__pyx_t_6, function);
23676  __pyx_t_5 = 1;
23677  }
23678  }
23679  #if CYTHON_FAST_PYCALL
23680  if (PyFunction_Check(__pyx_t_6)) {
23681  PyObject *__pyx_temp[55] = {__pyx_t_50, __pyx_t_3, __pyx_t_2, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_4, __pyx_t_20, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_26, __pyx_t_21, __pyx_t_27, __pyx_t_29, __pyx_t_28, __pyx_t_30, __pyx_t_32, __pyx_t_33, __pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_38, __pyx_t_31, __pyx_t_39, __pyx_t_41, __pyx_t_42, __pyx_v_jacobian, __pyx_t_43, __pyx_t_44, __pyx_t_45, __pyx_t_46, __pyx_t_47, __pyx_t_48, __pyx_t_40, __pyx_t_49, __pyx_t_51, __pyx_t_52, __pyx_t_53, __pyx_t_54, __pyx_t_55, __pyx_t_56, __pyx_t_57};
23682  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 54+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
23683  __Pyx_XDECREF(__pyx_t_50); __pyx_t_50 = 0;
23684  __Pyx_GOTREF(__pyx_t_1);
23685  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23686  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23687  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23688  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
23689  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
23690  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23691  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
23692  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
23693  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
23694  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
23695  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
23696  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
23697  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
23698  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
23699  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
23700  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23701  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23702  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
23703  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
23704  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
23705  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
23706  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
23707  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23708  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23709  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
23710  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23711  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
23712  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
23713  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
23714  __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0;
23715  __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
23716  __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
23717  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
23718  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
23719  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23720  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
23721  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
23722  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
23723  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
23724  __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
23725  __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
23726  __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
23727  __Pyx_DECREF(__pyx_t_47); __pyx_t_47 = 0;
23728  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
23729  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23730  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
23731  __Pyx_DECREF(__pyx_t_51); __pyx_t_51 = 0;
23732  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
23733  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
23734  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
23735  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
23736  __Pyx_DECREF(__pyx_t_56); __pyx_t_56 = 0;
23737  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
23738  } else
23739  #endif
23740  #if CYTHON_FAST_PYCCALL
23741  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
23742  PyObject *__pyx_temp[55] = {__pyx_t_50, __pyx_t_3, __pyx_t_2, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_4, __pyx_t_20, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_26, __pyx_t_21, __pyx_t_27, __pyx_t_29, __pyx_t_28, __pyx_t_30, __pyx_t_32, __pyx_t_33, __pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_38, __pyx_t_31, __pyx_t_39, __pyx_t_41, __pyx_t_42, __pyx_v_jacobian, __pyx_t_43, __pyx_t_44, __pyx_t_45, __pyx_t_46, __pyx_t_47, __pyx_t_48, __pyx_t_40, __pyx_t_49, __pyx_t_51, __pyx_t_52, __pyx_t_53, __pyx_t_54, __pyx_t_55, __pyx_t_56, __pyx_t_57};
23743  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 54+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
23744  __Pyx_XDECREF(__pyx_t_50); __pyx_t_50 = 0;
23745  __Pyx_GOTREF(__pyx_t_1);
23746  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23747  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23748  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23749  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
23750  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
23751  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23752  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
23753  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
23754  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
23755  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
23756  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
23757  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
23758  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
23759  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
23760  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
23761  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23762  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23763  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
23764  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
23765  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
23766  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
23767  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
23768  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23769  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23770  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
23771  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23772  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
23773  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
23774  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
23775  __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0;
23776  __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
23777  __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
23778  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
23779  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
23780  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23781  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
23782  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
23783  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
23784  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
23785  __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
23786  __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
23787  __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
23788  __Pyx_DECREF(__pyx_t_47); __pyx_t_47 = 0;
23789  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
23790  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23791  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
23792  __Pyx_DECREF(__pyx_t_51); __pyx_t_51 = 0;
23793  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
23794  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
23795  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
23796  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
23797  __Pyx_DECREF(__pyx_t_56); __pyx_t_56 = 0;
23798  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
23799  } else
23800  #endif
23801  {
23802  __pyx_t_58 = PyTuple_New(54+__pyx_t_5); if (unlikely(!__pyx_t_58)) __PYX_ERR(0, 1014, __pyx_L1_error)
23803  __Pyx_GOTREF(__pyx_t_58);
23804  if (__pyx_t_50) {
23805  __Pyx_GIVEREF(__pyx_t_50); PyTuple_SET_ITEM(__pyx_t_58, 0, __pyx_t_50); __pyx_t_50 = NULL;
23806  }
23807  __Pyx_GIVEREF(__pyx_t_3);
23808  PyTuple_SET_ITEM(__pyx_t_58, 0+__pyx_t_5, __pyx_t_3);
23809  __Pyx_GIVEREF(__pyx_t_2);
23810  PyTuple_SET_ITEM(__pyx_t_58, 1+__pyx_t_5, __pyx_t_2);
23811  __Pyx_GIVEREF(__pyx_t_7);
23812  PyTuple_SET_ITEM(__pyx_t_58, 2+__pyx_t_5, __pyx_t_7);
23813  __Pyx_GIVEREF(__pyx_t_8);
23814  PyTuple_SET_ITEM(__pyx_t_58, 3+__pyx_t_5, __pyx_t_8);
23815  __Pyx_GIVEREF(__pyx_t_9);
23816  PyTuple_SET_ITEM(__pyx_t_58, 4+__pyx_t_5, __pyx_t_9);
23817  __Pyx_GIVEREF(__pyx_t_10);
23818  PyTuple_SET_ITEM(__pyx_t_58, 5+__pyx_t_5, __pyx_t_10);
23819  __Pyx_GIVEREF(__pyx_t_11);
23820  PyTuple_SET_ITEM(__pyx_t_58, 6+__pyx_t_5, __pyx_t_11);
23821  __Pyx_GIVEREF(__pyx_t_12);
23822  PyTuple_SET_ITEM(__pyx_t_58, 7+__pyx_t_5, __pyx_t_12);
23823  __Pyx_GIVEREF(__pyx_t_13);
23824  PyTuple_SET_ITEM(__pyx_t_58, 8+__pyx_t_5, __pyx_t_13);
23825  __Pyx_GIVEREF(__pyx_t_14);
23826  PyTuple_SET_ITEM(__pyx_t_58, 9+__pyx_t_5, __pyx_t_14);
23827  __Pyx_GIVEREF(__pyx_t_15);
23828  PyTuple_SET_ITEM(__pyx_t_58, 10+__pyx_t_5, __pyx_t_15);
23829  __Pyx_GIVEREF(__pyx_t_16);
23830  PyTuple_SET_ITEM(__pyx_t_58, 11+__pyx_t_5, __pyx_t_16);
23831  __Pyx_GIVEREF(__pyx_t_17);
23832  PyTuple_SET_ITEM(__pyx_t_58, 12+__pyx_t_5, __pyx_t_17);
23833  __Pyx_GIVEREF(__pyx_t_18);
23834  PyTuple_SET_ITEM(__pyx_t_58, 13+__pyx_t_5, __pyx_t_18);
23835  __Pyx_GIVEREF(__pyx_t_19);
23836  PyTuple_SET_ITEM(__pyx_t_58, 14+__pyx_t_5, __pyx_t_19);
23837  __Pyx_GIVEREF(__pyx_t_4);
23838  PyTuple_SET_ITEM(__pyx_t_58, 15+__pyx_t_5, __pyx_t_4);
23839  __Pyx_GIVEREF(__pyx_t_20);
23840  PyTuple_SET_ITEM(__pyx_t_58, 16+__pyx_t_5, __pyx_t_20);
23841  __Pyx_GIVEREF(__pyx_t_22);
23842  PyTuple_SET_ITEM(__pyx_t_58, 17+__pyx_t_5, __pyx_t_22);
23843  __Pyx_GIVEREF(__pyx_t_23);
23844  PyTuple_SET_ITEM(__pyx_t_58, 18+__pyx_t_5, __pyx_t_23);
23845  __Pyx_GIVEREF(__pyx_t_24);
23846  PyTuple_SET_ITEM(__pyx_t_58, 19+__pyx_t_5, __pyx_t_24);
23847  __Pyx_GIVEREF(__pyx_t_25);
23848  PyTuple_SET_ITEM(__pyx_t_58, 20+__pyx_t_5, __pyx_t_25);
23849  __Pyx_GIVEREF(__pyx_t_26);
23850  PyTuple_SET_ITEM(__pyx_t_58, 21+__pyx_t_5, __pyx_t_26);
23851  __Pyx_GIVEREF(__pyx_t_21);
23852  PyTuple_SET_ITEM(__pyx_t_58, 22+__pyx_t_5, __pyx_t_21);
23853  __Pyx_GIVEREF(__pyx_t_27);
23854  PyTuple_SET_ITEM(__pyx_t_58, 23+__pyx_t_5, __pyx_t_27);
23855  __Pyx_GIVEREF(__pyx_t_29);
23856  PyTuple_SET_ITEM(__pyx_t_58, 24+__pyx_t_5, __pyx_t_29);
23857  __Pyx_GIVEREF(__pyx_t_28);
23858  PyTuple_SET_ITEM(__pyx_t_58, 25+__pyx_t_5, __pyx_t_28);
23859  __Pyx_GIVEREF(__pyx_t_30);
23860  PyTuple_SET_ITEM(__pyx_t_58, 26+__pyx_t_5, __pyx_t_30);
23861  __Pyx_GIVEREF(__pyx_t_32);
23862  PyTuple_SET_ITEM(__pyx_t_58, 27+__pyx_t_5, __pyx_t_32);
23863  __Pyx_GIVEREF(__pyx_t_33);
23864  PyTuple_SET_ITEM(__pyx_t_58, 28+__pyx_t_5, __pyx_t_33);
23865  __Pyx_GIVEREF(__pyx_t_34);
23866  PyTuple_SET_ITEM(__pyx_t_58, 29+__pyx_t_5, __pyx_t_34);
23867  __Pyx_GIVEREF(__pyx_t_35);
23868  PyTuple_SET_ITEM(__pyx_t_58, 30+__pyx_t_5, __pyx_t_35);
23869  __Pyx_GIVEREF(__pyx_t_36);
23870  PyTuple_SET_ITEM(__pyx_t_58, 31+__pyx_t_5, __pyx_t_36);
23871  __Pyx_GIVEREF(__pyx_t_37);
23872  PyTuple_SET_ITEM(__pyx_t_58, 32+__pyx_t_5, __pyx_t_37);
23873  __Pyx_GIVEREF(__pyx_t_38);
23874  PyTuple_SET_ITEM(__pyx_t_58, 33+__pyx_t_5, __pyx_t_38);
23875  __Pyx_GIVEREF(__pyx_t_31);
23876  PyTuple_SET_ITEM(__pyx_t_58, 34+__pyx_t_5, __pyx_t_31);
23877  __Pyx_GIVEREF(__pyx_t_39);
23878  PyTuple_SET_ITEM(__pyx_t_58, 35+__pyx_t_5, __pyx_t_39);
23879  __Pyx_GIVEREF(__pyx_t_41);
23880  PyTuple_SET_ITEM(__pyx_t_58, 36+__pyx_t_5, __pyx_t_41);
23881  __Pyx_GIVEREF(__pyx_t_42);
23882  PyTuple_SET_ITEM(__pyx_t_58, 37+__pyx_t_5, __pyx_t_42);
23883  __Pyx_INCREF(__pyx_v_jacobian);
23884  __Pyx_GIVEREF(__pyx_v_jacobian);
23885  PyTuple_SET_ITEM(__pyx_t_58, 38+__pyx_t_5, __pyx_v_jacobian);
23886  __Pyx_GIVEREF(__pyx_t_43);
23887  PyTuple_SET_ITEM(__pyx_t_58, 39+__pyx_t_5, __pyx_t_43);
23888  __Pyx_GIVEREF(__pyx_t_44);
23889  PyTuple_SET_ITEM(__pyx_t_58, 40+__pyx_t_5, __pyx_t_44);
23890  __Pyx_GIVEREF(__pyx_t_45);
23891  PyTuple_SET_ITEM(__pyx_t_58, 41+__pyx_t_5, __pyx_t_45);
23892  __Pyx_GIVEREF(__pyx_t_46);
23893  PyTuple_SET_ITEM(__pyx_t_58, 42+__pyx_t_5, __pyx_t_46);
23894  __Pyx_GIVEREF(__pyx_t_47);
23895  PyTuple_SET_ITEM(__pyx_t_58, 43+__pyx_t_5, __pyx_t_47);
23896  __Pyx_GIVEREF(__pyx_t_48);
23897  PyTuple_SET_ITEM(__pyx_t_58, 44+__pyx_t_5, __pyx_t_48);
23898  __Pyx_GIVEREF(__pyx_t_40);
23899  PyTuple_SET_ITEM(__pyx_t_58, 45+__pyx_t_5, __pyx_t_40);
23900  __Pyx_GIVEREF(__pyx_t_49);
23901  PyTuple_SET_ITEM(__pyx_t_58, 46+__pyx_t_5, __pyx_t_49);
23902  __Pyx_GIVEREF(__pyx_t_51);
23903  PyTuple_SET_ITEM(__pyx_t_58, 47+__pyx_t_5, __pyx_t_51);
23904  __Pyx_GIVEREF(__pyx_t_52);
23905  PyTuple_SET_ITEM(__pyx_t_58, 48+__pyx_t_5, __pyx_t_52);
23906  __Pyx_GIVEREF(__pyx_t_53);
23907  PyTuple_SET_ITEM(__pyx_t_58, 49+__pyx_t_5, __pyx_t_53);
23908  __Pyx_GIVEREF(__pyx_t_54);
23909  PyTuple_SET_ITEM(__pyx_t_58, 50+__pyx_t_5, __pyx_t_54);
23910  __Pyx_GIVEREF(__pyx_t_55);
23911  PyTuple_SET_ITEM(__pyx_t_58, 51+__pyx_t_5, __pyx_t_55);
23912  __Pyx_GIVEREF(__pyx_t_56);
23913  PyTuple_SET_ITEM(__pyx_t_58, 52+__pyx_t_5, __pyx_t_56);
23914  __Pyx_GIVEREF(__pyx_t_57);
23915  PyTuple_SET_ITEM(__pyx_t_58, 53+__pyx_t_5, __pyx_t_57);
23916  __pyx_t_3 = 0;
23917  __pyx_t_2 = 0;
23918  __pyx_t_7 = 0;
23919  __pyx_t_8 = 0;
23920  __pyx_t_9 = 0;
23921  __pyx_t_10 = 0;
23922  __pyx_t_11 = 0;
23923  __pyx_t_12 = 0;
23924  __pyx_t_13 = 0;
23925  __pyx_t_14 = 0;
23926  __pyx_t_15 = 0;
23927  __pyx_t_16 = 0;
23928  __pyx_t_17 = 0;
23929  __pyx_t_18 = 0;
23930  __pyx_t_19 = 0;
23931  __pyx_t_4 = 0;
23932  __pyx_t_20 = 0;
23933  __pyx_t_22 = 0;
23934  __pyx_t_23 = 0;
23935  __pyx_t_24 = 0;
23936  __pyx_t_25 = 0;
23937  __pyx_t_26 = 0;
23938  __pyx_t_21 = 0;
23939  __pyx_t_27 = 0;
23940  __pyx_t_29 = 0;
23941  __pyx_t_28 = 0;
23942  __pyx_t_30 = 0;
23943  __pyx_t_32 = 0;
23944  __pyx_t_33 = 0;
23945  __pyx_t_34 = 0;
23946  __pyx_t_35 = 0;
23947  __pyx_t_36 = 0;
23948  __pyx_t_37 = 0;
23949  __pyx_t_38 = 0;
23950  __pyx_t_31 = 0;
23951  __pyx_t_39 = 0;
23952  __pyx_t_41 = 0;
23953  __pyx_t_42 = 0;
23954  __pyx_t_43 = 0;
23955  __pyx_t_44 = 0;
23956  __pyx_t_45 = 0;
23957  __pyx_t_46 = 0;
23958  __pyx_t_47 = 0;
23959  __pyx_t_48 = 0;
23960  __pyx_t_40 = 0;
23961  __pyx_t_49 = 0;
23962  __pyx_t_51 = 0;
23963  __pyx_t_52 = 0;
23964  __pyx_t_53 = 0;
23965  __pyx_t_54 = 0;
23966  __pyx_t_55 = 0;
23967  __pyx_t_56 = 0;
23968  __pyx_t_57 = 0;
23969  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_58, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
23970  __Pyx_GOTREF(__pyx_t_1);
23971  __Pyx_DECREF(__pyx_t_58); __pyx_t_58 = 0;
23972  }
23973  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23974  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23975 
23976  /* "ADR.pyx":1070
23977  * self.ebqe['penalty'],
23978  * self.numericalFlux.boundaryAdjoint_sigma)
23979  * log("Jacobian ",level=10,data=jacobian) # <<<<<<<<<<<<<<
23980  * #mwf decide if this is reasonable for solver statistics
23981  * self.nonlinear_function_jacobian_evaluations += 1
23982  */
23983  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error)
23984  __Pyx_GOTREF(__pyx_t_1);
23985  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1070, __pyx_L1_error)
23986  __Pyx_GOTREF(__pyx_t_6);
23987  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_level, __pyx_int_10) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
23988  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_jacobian) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
23989  __pyx_t_58 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__92, __pyx_t_6); if (unlikely(!__pyx_t_58)) __PYX_ERR(0, 1070, __pyx_L1_error)
23990  __Pyx_GOTREF(__pyx_t_58);
23991  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23992  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23993  __Pyx_DECREF(__pyx_t_58); __pyx_t_58 = 0;
23994 
23995  /* "ADR.pyx":1072
23996  * log("Jacobian ",level=10,data=jacobian)
23997  * #mwf decide if this is reasonable for solver statistics
23998  * self.nonlinear_function_jacobian_evaluations += 1 # <<<<<<<<<<<<<<
23999  * return jacobian
24000  * def calculateElementQuadrature(self):
24001  */
24002  __pyx_t_58 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_function_jacobian_eval); if (unlikely(!__pyx_t_58)) __PYX_ERR(0, 1072, __pyx_L1_error)
24003  __Pyx_GOTREF(__pyx_t_58);
24004  __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_58, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1072, __pyx_L1_error)
24005  __Pyx_GOTREF(__pyx_t_6);
24006  __Pyx_DECREF(__pyx_t_58); __pyx_t_58 = 0;
24007  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_function_jacobian_eval, __pyx_t_6) < 0) __PYX_ERR(0, 1072, __pyx_L1_error)
24008  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24009 
24010  /* "ADR.pyx":1073
24011  * #mwf decide if this is reasonable for solver statistics
24012  * self.nonlinear_function_jacobian_evaluations += 1
24013  * return jacobian # <<<<<<<<<<<<<<
24014  * def calculateElementQuadrature(self):
24015  * """
24016  */
24017  __Pyx_XDECREF(__pyx_r);
24018  __Pyx_INCREF(__pyx_v_jacobian);
24019  __pyx_r = __pyx_v_jacobian;
24020  goto __pyx_L0;
24021 
24022  /* "ADR.pyx":1009
24023  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
24024  * self.nonlinear_function_evaluations += 1
24025  * def getJacobian(self,jacobian): # <<<<<<<<<<<<<<
24026  * #import superluWrappers
24027  * #import numpy
24028  */
24029 
24030  /* function exit code */
24031  __pyx_L1_error:;
24032  __Pyx_XDECREF(__pyx_t_1);
24033  __Pyx_XDECREF(__pyx_t_2);
24034  __Pyx_XDECREF(__pyx_t_3);
24035  __Pyx_XDECREF(__pyx_t_4);
24036  __Pyx_XDECREF(__pyx_t_6);
24037  __Pyx_XDECREF(__pyx_t_7);
24038  __Pyx_XDECREF(__pyx_t_8);
24039  __Pyx_XDECREF(__pyx_t_9);
24040  __Pyx_XDECREF(__pyx_t_10);
24041  __Pyx_XDECREF(__pyx_t_11);
24042  __Pyx_XDECREF(__pyx_t_12);
24043  __Pyx_XDECREF(__pyx_t_13);
24044  __Pyx_XDECREF(__pyx_t_14);
24045  __Pyx_XDECREF(__pyx_t_15);
24046  __Pyx_XDECREF(__pyx_t_16);
24047  __Pyx_XDECREF(__pyx_t_17);
24048  __Pyx_XDECREF(__pyx_t_18);
24049  __Pyx_XDECREF(__pyx_t_19);
24050  __Pyx_XDECREF(__pyx_t_20);
24051  __Pyx_XDECREF(__pyx_t_21);
24052  __Pyx_XDECREF(__pyx_t_22);
24053  __Pyx_XDECREF(__pyx_t_23);
24054  __Pyx_XDECREF(__pyx_t_24);
24055  __Pyx_XDECREF(__pyx_t_25);
24056  __Pyx_XDECREF(__pyx_t_26);
24057  __Pyx_XDECREF(__pyx_t_27);
24058  __Pyx_XDECREF(__pyx_t_28);
24059  __Pyx_XDECREF(__pyx_t_29);
24060  __Pyx_XDECREF(__pyx_t_30);
24061  __Pyx_XDECREF(__pyx_t_31);
24062  __Pyx_XDECREF(__pyx_t_32);
24063  __Pyx_XDECREF(__pyx_t_33);
24064  __Pyx_XDECREF(__pyx_t_34);
24065  __Pyx_XDECREF(__pyx_t_35);
24066  __Pyx_XDECREF(__pyx_t_36);
24067  __Pyx_XDECREF(__pyx_t_37);
24068  __Pyx_XDECREF(__pyx_t_38);
24069  __Pyx_XDECREF(__pyx_t_39);
24070  __Pyx_XDECREF(__pyx_t_40);
24071  __Pyx_XDECREF(__pyx_t_41);
24072  __Pyx_XDECREF(__pyx_t_42);
24073  __Pyx_XDECREF(__pyx_t_43);
24074  __Pyx_XDECREF(__pyx_t_44);
24075  __Pyx_XDECREF(__pyx_t_45);
24076  __Pyx_XDECREF(__pyx_t_46);
24077  __Pyx_XDECREF(__pyx_t_47);
24078  __Pyx_XDECREF(__pyx_t_48);
24079  __Pyx_XDECREF(__pyx_t_49);
24080  __Pyx_XDECREF(__pyx_t_50);
24081  __Pyx_XDECREF(__pyx_t_51);
24082  __Pyx_XDECREF(__pyx_t_52);
24083  __Pyx_XDECREF(__pyx_t_53);
24084  __Pyx_XDECREF(__pyx_t_54);
24085  __Pyx_XDECREF(__pyx_t_55);
24086  __Pyx_XDECREF(__pyx_t_56);
24087  __Pyx_XDECREF(__pyx_t_57);
24088  __Pyx_XDECREF(__pyx_t_58);
24089  __Pyx_AddTraceback("ADR.LevelModel.getJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
24090  __pyx_r = NULL;
24091  __pyx_L0:;
24092  __Pyx_XDECREF(__pyx_v_pdb);
24093  __Pyx_XGIVEREF(__pyx_r);
24094  __Pyx_RefNannyFinishContext();
24095  return __pyx_r;
24096 }
24097 
24098 /* "ADR.pyx":1074
24099  * self.nonlinear_function_jacobian_evaluations += 1
24100  * return jacobian
24101  * def calculateElementQuadrature(self): # <<<<<<<<<<<<<<
24102  * """
24103  * Calculate the physical location and weights of the quadrature rules
24104  */
24105 
24106 /* Python wrapper */
24107 static PyObject *__pyx_pw_3ADR_10LevelModel_9calculateElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
24108 static char __pyx_doc_3ADR_10LevelModel_8calculateElementQuadrature[] = "\n Calculate the physical location and weights of the quadrature rules\n and the shape information at the quadrature points.\n\n This function should be called only when the mesh changes.\n ";
24109 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_9calculateElementQuadrature = {"calculateElementQuadrature", (PyCFunction)__pyx_pw_3ADR_10LevelModel_9calculateElementQuadrature, METH_O, __pyx_doc_3ADR_10LevelModel_8calculateElementQuadrature};
24110 static PyObject *__pyx_pw_3ADR_10LevelModel_9calculateElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
24111  PyObject *__pyx_r = 0;
24112  __Pyx_RefNannyDeclarations
24113  __Pyx_RefNannySetupContext("calculateElementQuadrature (wrapper)", 0);
24114  __pyx_r = __pyx_pf_3ADR_10LevelModel_8calculateElementQuadrature(__pyx_self, ((PyObject *)__pyx_v_self));
24115 
24116  /* function exit code */
24117  __Pyx_RefNannyFinishContext();
24118  return __pyx_r;
24119 }
24120 
24121 static PyObject *__pyx_pf_3ADR_10LevelModel_8calculateElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
24122  PyObject *__pyx_r = NULL;
24123  __Pyx_RefNannyDeclarations
24124  PyObject *__pyx_t_1 = NULL;
24125  PyObject *__pyx_t_2 = NULL;
24126  PyObject *__pyx_t_3 = NULL;
24127  PyObject *__pyx_t_4 = NULL;
24128  PyObject *__pyx_t_5 = NULL;
24129  int __pyx_t_6;
24130  PyObject *__pyx_t_7 = NULL;
24131  int __pyx_t_8;
24132  int __pyx_t_9;
24133  PyObject *__pyx_t_10 = NULL;
24134  __Pyx_RefNannySetupContext("calculateElementQuadrature", 0);
24135 
24136  /* "ADR.pyx":1081
24137  * This function should be called only when the mesh changes.
24138  * """
24139  * self.u[0].femSpace.elementMaps.getValues(self.elementQuadraturePoints, # <<<<<<<<<<<<<<
24140  * self.q['x'])
24141  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints)
24142  */
24143  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error)
24144  __Pyx_GOTREF(__pyx_t_2);
24145  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
24146  __Pyx_GOTREF(__pyx_t_3);
24147  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24148  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error)
24149  __Pyx_GOTREF(__pyx_t_2);
24150  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24151  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
24152  __Pyx_GOTREF(__pyx_t_3);
24153  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24154  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getValues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error)
24155  __Pyx_GOTREF(__pyx_t_2);
24156  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24157  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
24158  __Pyx_GOTREF(__pyx_t_3);
24159 
24160  /* "ADR.pyx":1082
24161  * """
24162  * self.u[0].femSpace.elementMaps.getValues(self.elementQuadraturePoints,
24163  * self.q['x']) # <<<<<<<<<<<<<<
24164  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints)
24165  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints)
24166  */
24167  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1082, __pyx_L1_error)
24168  __Pyx_GOTREF(__pyx_t_4);
24169  __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1082, __pyx_L1_error)
24170  __Pyx_GOTREF(__pyx_t_5);
24171  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24172  __pyx_t_4 = NULL;
24173  __pyx_t_6 = 0;
24174  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24175  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
24176  if (likely(__pyx_t_4)) {
24177  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24178  __Pyx_INCREF(__pyx_t_4);
24179  __Pyx_INCREF(function);
24180  __Pyx_DECREF_SET(__pyx_t_2, function);
24181  __pyx_t_6 = 1;
24182  }
24183  }
24184  #if CYTHON_FAST_PYCALL
24185  if (PyFunction_Check(__pyx_t_2)) {
24186  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
24187  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
24188  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24189  __Pyx_GOTREF(__pyx_t_1);
24190  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24191  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24192  } else
24193  #endif
24194  #if CYTHON_FAST_PYCCALL
24195  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
24196  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
24197  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
24198  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24199  __Pyx_GOTREF(__pyx_t_1);
24200  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24201  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24202  } else
24203  #endif
24204  {
24205  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1081, __pyx_L1_error)
24206  __Pyx_GOTREF(__pyx_t_7);
24207  if (__pyx_t_4) {
24208  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
24209  }
24210  __Pyx_GIVEREF(__pyx_t_3);
24211  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
24212  __Pyx_GIVEREF(__pyx_t_5);
24213  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
24214  __pyx_t_3 = 0;
24215  __pyx_t_5 = 0;
24216  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
24217  __Pyx_GOTREF(__pyx_t_1);
24218  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24219  }
24220  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24221  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24222 
24223  /* "ADR.pyx":1083
24224  * self.u[0].femSpace.elementMaps.getValues(self.elementQuadraturePoints,
24225  * self.q['x'])
24226  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints) # <<<<<<<<<<<<<<
24227  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints)
24228  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints)
24229  */
24230  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error)
24231  __Pyx_GOTREF(__pyx_t_2);
24232  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1083, __pyx_L1_error)
24233  __Pyx_GOTREF(__pyx_t_7);
24234  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24235  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error)
24236  __Pyx_GOTREF(__pyx_t_2);
24237  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24238  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1083, __pyx_L1_error)
24239  __Pyx_GOTREF(__pyx_t_7);
24240  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24241  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_getBasisValuesRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error)
24242  __Pyx_GOTREF(__pyx_t_2);
24243  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24244  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1083, __pyx_L1_error)
24245  __Pyx_GOTREF(__pyx_t_7);
24246  __pyx_t_5 = NULL;
24247  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24248  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
24249  if (likely(__pyx_t_5)) {
24250  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24251  __Pyx_INCREF(__pyx_t_5);
24252  __Pyx_INCREF(function);
24253  __Pyx_DECREF_SET(__pyx_t_2, function);
24254  }
24255  }
24256  if (!__pyx_t_5) {
24257  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
24258  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24259  __Pyx_GOTREF(__pyx_t_1);
24260  } else {
24261  #if CYTHON_FAST_PYCALL
24262  if (PyFunction_Check(__pyx_t_2)) {
24263  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
24264  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
24265  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
24266  __Pyx_GOTREF(__pyx_t_1);
24267  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24268  } else
24269  #endif
24270  #if CYTHON_FAST_PYCCALL
24271  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
24272  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
24273  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
24274  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
24275  __Pyx_GOTREF(__pyx_t_1);
24276  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24277  } else
24278  #endif
24279  {
24280  __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __pyx_L1_error)
24281  __Pyx_GOTREF(__pyx_t_3);
24282  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
24283  __Pyx_GIVEREF(__pyx_t_7);
24284  PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_7);
24285  __pyx_t_7 = 0;
24286  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
24287  __Pyx_GOTREF(__pyx_t_1);
24288  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24289  }
24290  }
24291  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24292  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24293 
24294  /* "ADR.pyx":1084
24295  * self.q['x'])
24296  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints)
24297  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints) # <<<<<<<<<<<<<<
24298  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints)
24299  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
24300  */
24301  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error)
24302  __Pyx_GOTREF(__pyx_t_2);
24303  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error)
24304  __Pyx_GOTREF(__pyx_t_3);
24305  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24306  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error)
24307  __Pyx_GOTREF(__pyx_t_2);
24308  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24309  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error)
24310  __Pyx_GOTREF(__pyx_t_3);
24311  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24312  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getBasisGradientValuesRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error)
24313  __Pyx_GOTREF(__pyx_t_2);
24314  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24315  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error)
24316  __Pyx_GOTREF(__pyx_t_3);
24317  __pyx_t_7 = NULL;
24318  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24319  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
24320  if (likely(__pyx_t_7)) {
24321  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24322  __Pyx_INCREF(__pyx_t_7);
24323  __Pyx_INCREF(function);
24324  __Pyx_DECREF_SET(__pyx_t_2, function);
24325  }
24326  }
24327  if (!__pyx_t_7) {
24328  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
24329  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24330  __Pyx_GOTREF(__pyx_t_1);
24331  } else {
24332  #if CYTHON_FAST_PYCALL
24333  if (PyFunction_Check(__pyx_t_2)) {
24334  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3};
24335  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
24336  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24337  __Pyx_GOTREF(__pyx_t_1);
24338  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24339  } else
24340  #endif
24341  #if CYTHON_FAST_PYCCALL
24342  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
24343  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3};
24344  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
24345  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24346  __Pyx_GOTREF(__pyx_t_1);
24347  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24348  } else
24349  #endif
24350  {
24351  __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1084, __pyx_L1_error)
24352  __Pyx_GOTREF(__pyx_t_5);
24353  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
24354  __Pyx_GIVEREF(__pyx_t_3);
24355  PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
24356  __pyx_t_3 = 0;
24357  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
24358  __Pyx_GOTREF(__pyx_t_1);
24359  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24360  }
24361  }
24362  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24363  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24364 
24365  /* "ADR.pyx":1085
24366  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints)
24367  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints)
24368  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints) # <<<<<<<<<<<<<<
24369  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
24370  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
24371  */
24372  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error)
24373  __Pyx_GOTREF(__pyx_t_2);
24374  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1085, __pyx_L1_error)
24375  __Pyx_GOTREF(__pyx_t_5);
24376  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24377  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error)
24378  __Pyx_GOTREF(__pyx_t_2);
24379  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24380  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getBasisValuesRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1085, __pyx_L1_error)
24381  __Pyx_GOTREF(__pyx_t_5);
24382  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24383  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error)
24384  __Pyx_GOTREF(__pyx_t_2);
24385  __pyx_t_3 = NULL;
24386  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
24387  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
24388  if (likely(__pyx_t_3)) {
24389  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
24390  __Pyx_INCREF(__pyx_t_3);
24391  __Pyx_INCREF(function);
24392  __Pyx_DECREF_SET(__pyx_t_5, function);
24393  }
24394  }
24395  if (!__pyx_t_3) {
24396  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
24397  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24398  __Pyx_GOTREF(__pyx_t_1);
24399  } else {
24400  #if CYTHON_FAST_PYCALL
24401  if (PyFunction_Check(__pyx_t_5)) {
24402  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
24403  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
24404  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24405  __Pyx_GOTREF(__pyx_t_1);
24406  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24407  } else
24408  #endif
24409  #if CYTHON_FAST_PYCCALL
24410  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
24411  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
24412  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
24413  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24414  __Pyx_GOTREF(__pyx_t_1);
24415  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24416  } else
24417  #endif
24418  {
24419  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1085, __pyx_L1_error)
24420  __Pyx_GOTREF(__pyx_t_7);
24421  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
24422  __Pyx_GIVEREF(__pyx_t_2);
24423  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2);
24424  __pyx_t_2 = 0;
24425  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
24426  __Pyx_GOTREF(__pyx_t_1);
24427  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24428  }
24429  }
24430  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24431  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24432 
24433  /* "ADR.pyx":1086
24434  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints)
24435  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints)
24436  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints) # <<<<<<<<<<<<<<
24437  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
24438  * if self.stabilization is not None:
24439  */
24440  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
24441  __Pyx_GOTREF(__pyx_t_5);
24442  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1086, __pyx_L1_error)
24443  __Pyx_GOTREF(__pyx_t_7);
24444  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24445  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
24446  __Pyx_GOTREF(__pyx_t_5);
24447  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24448  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getBasisGradientValuesRef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1086, __pyx_L1_error)
24449  __Pyx_GOTREF(__pyx_t_7);
24450  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24451  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
24452  __Pyx_GOTREF(__pyx_t_5);
24453  __pyx_t_2 = NULL;
24454  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
24455  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
24456  if (likely(__pyx_t_2)) {
24457  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
24458  __Pyx_INCREF(__pyx_t_2);
24459  __Pyx_INCREF(function);
24460  __Pyx_DECREF_SET(__pyx_t_7, function);
24461  }
24462  }
24463  if (!__pyx_t_2) {
24464  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
24465  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24466  __Pyx_GOTREF(__pyx_t_1);
24467  } else {
24468  #if CYTHON_FAST_PYCALL
24469  if (PyFunction_Check(__pyx_t_7)) {
24470  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
24471  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
24472  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24473  __Pyx_GOTREF(__pyx_t_1);
24474  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24475  } else
24476  #endif
24477  #if CYTHON_FAST_PYCCALL
24478  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
24479  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
24480  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
24481  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24482  __Pyx_GOTREF(__pyx_t_1);
24483  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24484  } else
24485  #endif
24486  {
24487  __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1086, __pyx_L1_error)
24488  __Pyx_GOTREF(__pyx_t_3);
24489  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
24490  __Pyx_GIVEREF(__pyx_t_5);
24491  PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_5);
24492  __pyx_t_5 = 0;
24493  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
24494  __Pyx_GOTREF(__pyx_t_1);
24495  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24496  }
24497  }
24498  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24499  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24500 
24501  /* "ADR.pyx":1087
24502  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints)
24503  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
24504  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q) # <<<<<<<<<<<<<<
24505  * if self.stabilization is not None:
24506  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24507  */
24508  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1087, __pyx_L1_error)
24509  __Pyx_GOTREF(__pyx_t_7);
24510  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_initializeElementQuadrature); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error)
24511  __Pyx_GOTREF(__pyx_t_3);
24512  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24513  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1087, __pyx_L1_error)
24514  __Pyx_GOTREF(__pyx_t_7);
24515  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1087, __pyx_L1_error)
24516  __Pyx_GOTREF(__pyx_t_5);
24517  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24518  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1087, __pyx_L1_error)
24519  __Pyx_GOTREF(__pyx_t_7);
24520  __pyx_t_2 = NULL;
24521  __pyx_t_6 = 0;
24522  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
24523  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
24524  if (likely(__pyx_t_2)) {
24525  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
24526  __Pyx_INCREF(__pyx_t_2);
24527  __Pyx_INCREF(function);
24528  __Pyx_DECREF_SET(__pyx_t_3, function);
24529  __pyx_t_6 = 1;
24530  }
24531  }
24532  #if CYTHON_FAST_PYCALL
24533  if (PyFunction_Check(__pyx_t_3)) {
24534  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_t_7};
24535  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
24536  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24537  __Pyx_GOTREF(__pyx_t_1);
24538  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24539  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24540  } else
24541  #endif
24542  #if CYTHON_FAST_PYCCALL
24543  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
24544  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_t_7};
24545  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
24546  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24547  __Pyx_GOTREF(__pyx_t_1);
24548  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24549  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24550  } else
24551  #endif
24552  {
24553  __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L1_error)
24554  __Pyx_GOTREF(__pyx_t_4);
24555  if (__pyx_t_2) {
24556  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
24557  }
24558  __Pyx_GIVEREF(__pyx_t_5);
24559  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_5);
24560  __Pyx_GIVEREF(__pyx_t_7);
24561  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_t_7);
24562  __pyx_t_5 = 0;
24563  __pyx_t_7 = 0;
24564  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
24565  __Pyx_GOTREF(__pyx_t_1);
24566  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24567  }
24568  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24569  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24570 
24571  /* "ADR.pyx":1088
24572  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
24573  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
24574  * if self.stabilization is not None: # <<<<<<<<<<<<<<
24575  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24576  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24577  */
24578  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1088, __pyx_L1_error)
24579  __Pyx_GOTREF(__pyx_t_1);
24580  __pyx_t_8 = (__pyx_t_1 != Py_None);
24581  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24582  __pyx_t_9 = (__pyx_t_8 != 0);
24583  if (__pyx_t_9) {
24584 
24585  /* "ADR.pyx":1089
24586  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
24587  * if self.stabilization is not None:
24588  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q) # <<<<<<<<<<<<<<
24589  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24590  * if self.shockCapturing is not None:
24591  */
24592  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
24593  __Pyx_GOTREF(__pyx_t_3);
24594  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_initializeElementQuadrature); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1089, __pyx_L1_error)
24595  __Pyx_GOTREF(__pyx_t_4);
24596  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24597  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
24598  __Pyx_GOTREF(__pyx_t_3);
24599  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1089, __pyx_L1_error)
24600  __Pyx_GOTREF(__pyx_t_7);
24601  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1089, __pyx_L1_error)
24602  __Pyx_GOTREF(__pyx_t_5);
24603  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24604  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1089, __pyx_L1_error)
24605  __Pyx_GOTREF(__pyx_t_7);
24606  __pyx_t_2 = NULL;
24607  __pyx_t_6 = 0;
24608  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
24609  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
24610  if (likely(__pyx_t_2)) {
24611  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
24612  __Pyx_INCREF(__pyx_t_2);
24613  __Pyx_INCREF(function);
24614  __Pyx_DECREF_SET(__pyx_t_4, function);
24615  __pyx_t_6 = 1;
24616  }
24617  }
24618  #if CYTHON_FAST_PYCALL
24619  if (PyFunction_Check(__pyx_t_4)) {
24620  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_3, __pyx_t_5, __pyx_t_7};
24621  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
24622  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24623  __Pyx_GOTREF(__pyx_t_1);
24624  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24625  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24626  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24627  } else
24628  #endif
24629  #if CYTHON_FAST_PYCCALL
24630  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
24631  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_3, __pyx_t_5, __pyx_t_7};
24632  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
24633  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24634  __Pyx_GOTREF(__pyx_t_1);
24635  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24636  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24637  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24638  } else
24639  #endif
24640  {
24641  __pyx_t_10 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1089, __pyx_L1_error)
24642  __Pyx_GOTREF(__pyx_t_10);
24643  if (__pyx_t_2) {
24644  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __pyx_t_2 = NULL;
24645  }
24646  __Pyx_GIVEREF(__pyx_t_3);
24647  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_t_3);
24648  __Pyx_GIVEREF(__pyx_t_5);
24649  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_t_5);
24650  __Pyx_GIVEREF(__pyx_t_7);
24651  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_6, __pyx_t_7);
24652  __pyx_t_3 = 0;
24653  __pyx_t_5 = 0;
24654  __pyx_t_7 = 0;
24655  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
24656  __Pyx_GOTREF(__pyx_t_1);
24657  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24658  }
24659  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24660  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24661 
24662  /* "ADR.pyx":1090
24663  * if self.stabilization is not None:
24664  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24665  * self.stabilization.initializeTimeIntegration(self.timeIntegration) # <<<<<<<<<<<<<<
24666  * if self.shockCapturing is not None:
24667  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24668  */
24669  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __pyx_L1_error)
24670  __Pyx_GOTREF(__pyx_t_4);
24671  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_initializeTimeIntegration); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1090, __pyx_L1_error)
24672  __Pyx_GOTREF(__pyx_t_10);
24673  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24674  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __pyx_L1_error)
24675  __Pyx_GOTREF(__pyx_t_4);
24676  __pyx_t_7 = NULL;
24677  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
24678  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
24679  if (likely(__pyx_t_7)) {
24680  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
24681  __Pyx_INCREF(__pyx_t_7);
24682  __Pyx_INCREF(function);
24683  __Pyx_DECREF_SET(__pyx_t_10, function);
24684  }
24685  }
24686  if (!__pyx_t_7) {
24687  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1090, __pyx_L1_error)
24688  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24689  __Pyx_GOTREF(__pyx_t_1);
24690  } else {
24691  #if CYTHON_FAST_PYCALL
24692  if (PyFunction_Check(__pyx_t_10)) {
24693  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
24694  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1090, __pyx_L1_error)
24695  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24696  __Pyx_GOTREF(__pyx_t_1);
24697  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24698  } else
24699  #endif
24700  #if CYTHON_FAST_PYCCALL
24701  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
24702  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
24703  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1090, __pyx_L1_error)
24704  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24705  __Pyx_GOTREF(__pyx_t_1);
24706  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24707  } else
24708  #endif
24709  {
24710  __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1090, __pyx_L1_error)
24711  __Pyx_GOTREF(__pyx_t_5);
24712  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
24713  __Pyx_GIVEREF(__pyx_t_4);
24714  PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
24715  __pyx_t_4 = 0;
24716  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1090, __pyx_L1_error)
24717  __Pyx_GOTREF(__pyx_t_1);
24718  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24719  }
24720  }
24721  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24722  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24723 
24724  /* "ADR.pyx":1088
24725  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
24726  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
24727  * if self.stabilization is not None: # <<<<<<<<<<<<<<
24728  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24729  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24730  */
24731  }
24732 
24733  /* "ADR.pyx":1091
24734  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24735  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24736  * if self.shockCapturing is not None: # <<<<<<<<<<<<<<
24737  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24738  * def calculateElementBoundaryQuadrature(self):
24739  */
24740  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
24741  __Pyx_GOTREF(__pyx_t_1);
24742  __pyx_t_9 = (__pyx_t_1 != Py_None);
24743  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24744  __pyx_t_8 = (__pyx_t_9 != 0);
24745  if (__pyx_t_8) {
24746 
24747  /* "ADR.pyx":1092
24748  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24749  * if self.shockCapturing is not None:
24750  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q) # <<<<<<<<<<<<<<
24751  * def calculateElementBoundaryQuadrature(self):
24752  * pass
24753  */
24754  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1092, __pyx_L1_error)
24755  __Pyx_GOTREF(__pyx_t_10);
24756  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_initializeElementQuadrature); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L1_error)
24757  __Pyx_GOTREF(__pyx_t_5);
24758  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24759  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1092, __pyx_L1_error)
24760  __Pyx_GOTREF(__pyx_t_10);
24761  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1092, __pyx_L1_error)
24762  __Pyx_GOTREF(__pyx_t_4);
24763  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_t); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1092, __pyx_L1_error)
24764  __Pyx_GOTREF(__pyx_t_7);
24765  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24766  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1092, __pyx_L1_error)
24767  __Pyx_GOTREF(__pyx_t_4);
24768  __pyx_t_3 = NULL;
24769  __pyx_t_6 = 0;
24770  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
24771  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
24772  if (likely(__pyx_t_3)) {
24773  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
24774  __Pyx_INCREF(__pyx_t_3);
24775  __Pyx_INCREF(function);
24776  __Pyx_DECREF_SET(__pyx_t_5, function);
24777  __pyx_t_6 = 1;
24778  }
24779  }
24780  #if CYTHON_FAST_PYCALL
24781  if (PyFunction_Check(__pyx_t_5)) {
24782  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_10, __pyx_t_7, __pyx_t_4};
24783  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
24784  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24785  __Pyx_GOTREF(__pyx_t_1);
24786  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24787  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24788  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24789  } else
24790  #endif
24791  #if CYTHON_FAST_PYCCALL
24792  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
24793  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_10, __pyx_t_7, __pyx_t_4};
24794  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
24795  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24796  __Pyx_GOTREF(__pyx_t_1);
24797  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24798  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24799  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24800  } else
24801  #endif
24802  {
24803  __pyx_t_2 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error)
24804  __Pyx_GOTREF(__pyx_t_2);
24805  if (__pyx_t_3) {
24806  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
24807  }
24808  __Pyx_GIVEREF(__pyx_t_10);
24809  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_10);
24810  __Pyx_GIVEREF(__pyx_t_7);
24811  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_t_7);
24812  __Pyx_GIVEREF(__pyx_t_4);
24813  PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_t_4);
24814  __pyx_t_10 = 0;
24815  __pyx_t_7 = 0;
24816  __pyx_t_4 = 0;
24817  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
24818  __Pyx_GOTREF(__pyx_t_1);
24819  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24820  }
24821  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24822  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24823 
24824  /* "ADR.pyx":1091
24825  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24826  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24827  * if self.shockCapturing is not None: # <<<<<<<<<<<<<<
24828  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24829  * def calculateElementBoundaryQuadrature(self):
24830  */
24831  }
24832 
24833  /* "ADR.pyx":1074
24834  * self.nonlinear_function_jacobian_evaluations += 1
24835  * return jacobian
24836  * def calculateElementQuadrature(self): # <<<<<<<<<<<<<<
24837  * """
24838  * Calculate the physical location and weights of the quadrature rules
24839  */
24840 
24841  /* function exit code */
24842  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24843  goto __pyx_L0;
24844  __pyx_L1_error:;
24845  __Pyx_XDECREF(__pyx_t_1);
24846  __Pyx_XDECREF(__pyx_t_2);
24847  __Pyx_XDECREF(__pyx_t_3);
24848  __Pyx_XDECREF(__pyx_t_4);
24849  __Pyx_XDECREF(__pyx_t_5);
24850  __Pyx_XDECREF(__pyx_t_7);
24851  __Pyx_XDECREF(__pyx_t_10);
24852  __Pyx_AddTraceback("ADR.LevelModel.calculateElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
24853  __pyx_r = NULL;
24854  __pyx_L0:;
24855  __Pyx_XGIVEREF(__pyx_r);
24856  __Pyx_RefNannyFinishContext();
24857  return __pyx_r;
24858 }
24859 
24860 /* "ADR.pyx":1093
24861  * if self.shockCapturing is not None:
24862  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24863  * def calculateElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
24864  * pass
24865  * def calculateExteriorElementBoundaryQuadrature(self):
24866  */
24867 
24868 /* Python wrapper */
24869 static PyObject *__pyx_pw_3ADR_10LevelModel_11calculateElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
24870 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_11calculateElementBoundaryQuadrature = {"calculateElementBoundaryQuadrature", (PyCFunction)__pyx_pw_3ADR_10LevelModel_11calculateElementBoundaryQuadrature, METH_O, 0};
24871 static PyObject *__pyx_pw_3ADR_10LevelModel_11calculateElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
24872  PyObject *__pyx_r = 0;
24873  __Pyx_RefNannyDeclarations
24874  __Pyx_RefNannySetupContext("calculateElementBoundaryQuadrature (wrapper)", 0);
24875  __pyx_r = __pyx_pf_3ADR_10LevelModel_10calculateElementBoundaryQuadrature(__pyx_self, ((PyObject *)__pyx_v_self));
24876 
24877  /* function exit code */
24878  __Pyx_RefNannyFinishContext();
24879  return __pyx_r;
24880 }
24881 
24882 static PyObject *__pyx_pf_3ADR_10LevelModel_10calculateElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
24883  PyObject *__pyx_r = NULL;
24884  __Pyx_RefNannyDeclarations
24885  __Pyx_RefNannySetupContext("calculateElementBoundaryQuadrature", 0);
24886 
24887  /* function exit code */
24888  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24889  __Pyx_XGIVEREF(__pyx_r);
24890  __Pyx_RefNannyFinishContext();
24891  return __pyx_r;
24892 }
24893 
24894 /* "ADR.pyx":1095
24895  * def calculateElementBoundaryQuadrature(self):
24896  * pass
24897  * def calculateExteriorElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
24898  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
24899  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24900  */
24901 
24902 /* Python wrapper */
24903 static PyObject *__pyx_pw_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
24904 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature = {"calculateExteriorElementBoundaryQuadrature", (PyCFunction)__pyx_pw_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature, METH_O, 0};
24905 static PyObject *__pyx_pw_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
24906  PyObject *__pyx_r = 0;
24907  __Pyx_RefNannyDeclarations
24908  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryQuadrature (wrapper)", 0);
24909  __pyx_r = __pyx_pf_3ADR_10LevelModel_12calculateExteriorElementBoundaryQuadrature(__pyx_self, ((PyObject *)__pyx_v_self));
24910 
24911  /* function exit code */
24912  __Pyx_RefNannyFinishContext();
24913  return __pyx_r;
24914 }
24915 
24916 static PyObject *__pyx_pf_3ADR_10LevelModel_12calculateExteriorElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
24917  PyObject *__pyx_v_cj = NULL;
24918  PyObject *__pyx_r = NULL;
24919  __Pyx_RefNannyDeclarations
24920  PyObject *__pyx_t_1 = NULL;
24921  PyObject *__pyx_t_2 = NULL;
24922  PyObject *__pyx_t_3 = NULL;
24923  PyObject *__pyx_t_4 = NULL;
24924  PyObject *__pyx_t_5 = NULL;
24925  int __pyx_t_6;
24926  PyObject *__pyx_t_7 = NULL;
24927  Py_ssize_t __pyx_t_8;
24928  PyObject *(*__pyx_t_9)(PyObject *);
24929  PyObject *__pyx_t_10 = NULL;
24930  PyObject *__pyx_t_11 = NULL;
24931  PyObject *__pyx_t_12 = NULL;
24932  PyObject *__pyx_t_13 = NULL;
24933  PyObject *__pyx_t_14 = NULL;
24934  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryQuadrature", 0);
24935 
24936  /* "ADR.pyx":1096
24937  * pass
24938  * def calculateExteriorElementBoundaryQuadrature(self):
24939  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints) # <<<<<<<<<<<<<<
24940  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24941  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
24942  */
24943  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
24944  __Pyx_GOTREF(__pyx_t_2);
24945  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
24946  __Pyx_GOTREF(__pyx_t_3);
24947  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24948  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
24949  __Pyx_GOTREF(__pyx_t_2);
24950  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24951  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
24952  __Pyx_GOTREF(__pyx_t_3);
24953  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24954  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getBasisValuesTraceRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
24955  __Pyx_GOTREF(__pyx_t_2);
24956  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24957  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
24958  __Pyx_GOTREF(__pyx_t_3);
24959  __pyx_t_4 = NULL;
24960  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24961  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
24962  if (likely(__pyx_t_4)) {
24963  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24964  __Pyx_INCREF(__pyx_t_4);
24965  __Pyx_INCREF(function);
24966  __Pyx_DECREF_SET(__pyx_t_2, function);
24967  }
24968  }
24969  if (!__pyx_t_4) {
24970  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
24971  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24972  __Pyx_GOTREF(__pyx_t_1);
24973  } else {
24974  #if CYTHON_FAST_PYCALL
24975  if (PyFunction_Check(__pyx_t_2)) {
24976  PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
24977  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
24978  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24979  __Pyx_GOTREF(__pyx_t_1);
24980  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24981  } else
24982  #endif
24983  #if CYTHON_FAST_PYCCALL
24984  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
24985  PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
24986  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
24987  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24988  __Pyx_GOTREF(__pyx_t_1);
24989  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24990  } else
24991  #endif
24992  {
24993  __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1096, __pyx_L1_error)
24994  __Pyx_GOTREF(__pyx_t_5);
24995  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
24996  __Pyx_GIVEREF(__pyx_t_3);
24997  PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
24998  __pyx_t_3 = 0;
24999  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
25000  __Pyx_GOTREF(__pyx_t_1);
25001  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25002  }
25003  }
25004  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25005  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25006 
25007  /* "ADR.pyx":1097
25008  * def calculateExteriorElementBoundaryQuadrature(self):
25009  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
25010  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints) # <<<<<<<<<<<<<<
25011  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
25012  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25013  */
25014  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
25015  __Pyx_GOTREF(__pyx_t_2);
25016  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error)
25017  __Pyx_GOTREF(__pyx_t_5);
25018  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25019  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
25020  __Pyx_GOTREF(__pyx_t_2);
25021  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25022  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error)
25023  __Pyx_GOTREF(__pyx_t_5);
25024  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25025  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getBasisGradientValuesTraceRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
25026  __Pyx_GOTREF(__pyx_t_2);
25027  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25028  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error)
25029  __Pyx_GOTREF(__pyx_t_5);
25030  __pyx_t_3 = NULL;
25031  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
25032  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
25033  if (likely(__pyx_t_3)) {
25034  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
25035  __Pyx_INCREF(__pyx_t_3);
25036  __Pyx_INCREF(function);
25037  __Pyx_DECREF_SET(__pyx_t_2, function);
25038  }
25039  }
25040  if (!__pyx_t_3) {
25041  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
25042  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25043  __Pyx_GOTREF(__pyx_t_1);
25044  } else {
25045  #if CYTHON_FAST_PYCALL
25046  if (PyFunction_Check(__pyx_t_2)) {
25047  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
25048  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
25049  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
25050  __Pyx_GOTREF(__pyx_t_1);
25051  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25052  } else
25053  #endif
25054  #if CYTHON_FAST_PYCCALL
25055  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
25056  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
25057  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
25058  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
25059  __Pyx_GOTREF(__pyx_t_1);
25060  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25061  } else
25062  #endif
25063  {
25064  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error)
25065  __Pyx_GOTREF(__pyx_t_4);
25066  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
25067  __Pyx_GIVEREF(__pyx_t_5);
25068  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5);
25069  __pyx_t_5 = 0;
25070  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
25071  __Pyx_GOTREF(__pyx_t_1);
25072  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25073  }
25074  }
25075  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25076  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25077 
25078  /* "ADR.pyx":1098
25079  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
25080  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25081  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints) # <<<<<<<<<<<<<<
25082  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25083  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25084  */
25085  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1098, __pyx_L1_error)
25086  __Pyx_GOTREF(__pyx_t_2);
25087  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
25088  __Pyx_GOTREF(__pyx_t_4);
25089  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25090  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1098, __pyx_L1_error)
25091  __Pyx_GOTREF(__pyx_t_2);
25092  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25093  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getBasisValuesTraceRef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
25094  __Pyx_GOTREF(__pyx_t_4);
25095  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25096  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1098, __pyx_L1_error)
25097  __Pyx_GOTREF(__pyx_t_2);
25098  __pyx_t_5 = NULL;
25099  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
25100  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
25101  if (likely(__pyx_t_5)) {
25102  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
25103  __Pyx_INCREF(__pyx_t_5);
25104  __Pyx_INCREF(function);
25105  __Pyx_DECREF_SET(__pyx_t_4, function);
25106  }
25107  }
25108  if (!__pyx_t_5) {
25109  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
25110  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25111  __Pyx_GOTREF(__pyx_t_1);
25112  } else {
25113  #if CYTHON_FAST_PYCALL
25114  if (PyFunction_Check(__pyx_t_4)) {
25115  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
25116  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
25117  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25118  __Pyx_GOTREF(__pyx_t_1);
25119  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25120  } else
25121  #endif
25122  #if CYTHON_FAST_PYCCALL
25123  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
25124  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
25125  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
25126  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25127  __Pyx_GOTREF(__pyx_t_1);
25128  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25129  } else
25130  #endif
25131  {
25132  __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1098, __pyx_L1_error)
25133  __Pyx_GOTREF(__pyx_t_3);
25134  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
25135  __Pyx_GIVEREF(__pyx_t_2);
25136  PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_2);
25137  __pyx_t_2 = 0;
25138  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
25139  __Pyx_GOTREF(__pyx_t_1);
25140  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25141  }
25142  }
25143  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25144  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25145 
25146  /* "ADR.pyx":1099
25147  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25148  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
25149  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints) # <<<<<<<<<<<<<<
25150  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25151  * self.ebqe['x'])
25152  */
25153  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
25154  __Pyx_GOTREF(__pyx_t_4);
25155  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1099, __pyx_L1_error)
25156  __Pyx_GOTREF(__pyx_t_3);
25157  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25158  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
25159  __Pyx_GOTREF(__pyx_t_4);
25160  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25161  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getBasisGradientValuesTraceRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1099, __pyx_L1_error)
25162  __Pyx_GOTREF(__pyx_t_3);
25163  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25164  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
25165  __Pyx_GOTREF(__pyx_t_4);
25166  __pyx_t_2 = NULL;
25167  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
25168  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
25169  if (likely(__pyx_t_2)) {
25170  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
25171  __Pyx_INCREF(__pyx_t_2);
25172  __Pyx_INCREF(function);
25173  __Pyx_DECREF_SET(__pyx_t_3, function);
25174  }
25175  }
25176  if (!__pyx_t_2) {
25177  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
25178  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25179  __Pyx_GOTREF(__pyx_t_1);
25180  } else {
25181  #if CYTHON_FAST_PYCALL
25182  if (PyFunction_Check(__pyx_t_3)) {
25183  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
25184  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
25185  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25186  __Pyx_GOTREF(__pyx_t_1);
25187  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25188  } else
25189  #endif
25190  #if CYTHON_FAST_PYCCALL
25191  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
25192  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
25193  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
25194  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25195  __Pyx_GOTREF(__pyx_t_1);
25196  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25197  } else
25198  #endif
25199  {
25200  __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1099, __pyx_L1_error)
25201  __Pyx_GOTREF(__pyx_t_5);
25202  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
25203  __Pyx_GIVEREF(__pyx_t_4);
25204  PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
25205  __pyx_t_4 = 0;
25206  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
25207  __Pyx_GOTREF(__pyx_t_1);
25208  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25209  }
25210  }
25211  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25212  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25213 
25214  /* "ADR.pyx":1100
25215  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
25216  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25217  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints, # <<<<<<<<<<<<<<
25218  * self.ebqe['x'])
25219  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh,
25220  */
25221  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error)
25222  __Pyx_GOTREF(__pyx_t_3);
25223  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1100, __pyx_L1_error)
25224  __Pyx_GOTREF(__pyx_t_5);
25225  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25226  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error)
25227  __Pyx_GOTREF(__pyx_t_3);
25228  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25229  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1100, __pyx_L1_error)
25230  __Pyx_GOTREF(__pyx_t_5);
25231  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25232  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getValuesGlobalExteriorTrace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error)
25233  __Pyx_GOTREF(__pyx_t_3);
25234  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25235  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1100, __pyx_L1_error)
25236  __Pyx_GOTREF(__pyx_t_5);
25237 
25238  /* "ADR.pyx":1101
25239  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25240  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25241  * self.ebqe['x']) # <<<<<<<<<<<<<<
25242  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh,
25243  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25244  */
25245  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1101, __pyx_L1_error)
25246  __Pyx_GOTREF(__pyx_t_4);
25247  __pyx_t_2 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
25248  __Pyx_GOTREF(__pyx_t_2);
25249  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25250  __pyx_t_4 = NULL;
25251  __pyx_t_6 = 0;
25252  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
25253  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
25254  if (likely(__pyx_t_4)) {
25255  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
25256  __Pyx_INCREF(__pyx_t_4);
25257  __Pyx_INCREF(function);
25258  __Pyx_DECREF_SET(__pyx_t_3, function);
25259  __pyx_t_6 = 1;
25260  }
25261  }
25262  #if CYTHON_FAST_PYCALL
25263  if (PyFunction_Check(__pyx_t_3)) {
25264  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_t_2};
25265  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
25266  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25267  __Pyx_GOTREF(__pyx_t_1);
25268  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25269  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25270  } else
25271  #endif
25272  #if CYTHON_FAST_PYCCALL
25273  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
25274  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_t_2};
25275  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
25276  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25277  __Pyx_GOTREF(__pyx_t_1);
25278  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25279  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25280  } else
25281  #endif
25282  {
25283  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1100, __pyx_L1_error)
25284  __Pyx_GOTREF(__pyx_t_7);
25285  if (__pyx_t_4) {
25286  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
25287  }
25288  __Pyx_GIVEREF(__pyx_t_5);
25289  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
25290  __Pyx_GIVEREF(__pyx_t_2);
25291  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_2);
25292  __pyx_t_5 = 0;
25293  __pyx_t_2 = 0;
25294  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
25295  __Pyx_GOTREF(__pyx_t_1);
25296  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25297  }
25298  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25299  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25300 
25301  /* "ADR.pyx":1102
25302  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25303  * self.ebqe['x'])
25304  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh, # <<<<<<<<<<<<<<
25305  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25306  * self.ebqe[('x')],
25307  */
25308  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error)
25309  __Pyx_GOTREF(__pyx_t_1);
25310 
25311  /* "ADR.pyx":1107
25312  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
25313  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
25314  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()]) # <<<<<<<<<<<<<<
25315  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
25316  * def estimate_mt(self):
25317  */
25318  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_advectiveFluxBoundaryConditionsS); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1107, __pyx_L1_error)
25319  __Pyx_GOTREF(__pyx_t_7);
25320  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error)
25321  __Pyx_GOTREF(__pyx_t_2);
25322  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25323  __pyx_t_7 = NULL;
25324  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
25325  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
25326  if (likely(__pyx_t_7)) {
25327  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
25328  __Pyx_INCREF(__pyx_t_7);
25329  __Pyx_INCREF(function);
25330  __Pyx_DECREF_SET(__pyx_t_2, function);
25331  }
25332  }
25333  if (__pyx_t_7) {
25334  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1107, __pyx_L1_error)
25335  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25336  } else {
25337  __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1107, __pyx_L1_error)
25338  }
25339  __Pyx_GOTREF(__pyx_t_3);
25340  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25341  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
25342  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
25343  __pyx_t_9 = NULL;
25344  } else {
25345  __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error)
25346  __Pyx_GOTREF(__pyx_t_2);
25347  __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1107, __pyx_L1_error)
25348  }
25349  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25350  for (;;) {
25351  if (likely(!__pyx_t_9)) {
25352  if (likely(PyList_CheckExact(__pyx_t_2))) {
25353  if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
25354  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25355  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1107, __pyx_L1_error)
25356  #else
25357  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1107, __pyx_L1_error)
25358  __Pyx_GOTREF(__pyx_t_3);
25359  #endif
25360  } else {
25361  if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
25362  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25363  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1107, __pyx_L1_error)
25364  #else
25365  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1107, __pyx_L1_error)
25366  __Pyx_GOTREF(__pyx_t_3);
25367  #endif
25368  }
25369  } else {
25370  __pyx_t_3 = __pyx_t_9(__pyx_t_2);
25371  if (unlikely(!__pyx_t_3)) {
25372  PyObject* exc_type = PyErr_Occurred();
25373  if (exc_type) {
25374  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
25375  else __PYX_ERR(0, 1107, __pyx_L1_error)
25376  }
25377  break;
25378  }
25379  __Pyx_GOTREF(__pyx_t_3);
25380  }
25381  __Pyx_XDECREF_SET(__pyx_v_cj, __pyx_t_3);
25382  __pyx_t_3 = 0;
25383 
25384  /* "ADR.pyx":1102
25385  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25386  * self.ebqe['x'])
25387  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh, # <<<<<<<<<<<<<<
25388  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25389  * self.ebqe[('x')],
25390  */
25391  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_FluxBoundaryConditions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1102, __pyx_L1_error)
25392  __Pyx_GOTREF(__pyx_t_7);
25393  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1102, __pyx_L1_error)
25394  __Pyx_GOTREF(__pyx_t_5);
25395 
25396  /* "ADR.pyx":1103
25397  * self.ebqe['x'])
25398  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh,
25399  * self.nElementBoundaryQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
25400  * self.ebqe[('x')],
25401  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
25402  */
25403  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error)
25404  __Pyx_GOTREF(__pyx_t_4);
25405 
25406  /* "ADR.pyx":1104
25407  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh,
25408  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25409  * self.ebqe[('x')], # <<<<<<<<<<<<<<
25410  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
25411  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
25412  */
25413  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1104, __pyx_L1_error)
25414  __Pyx_GOTREF(__pyx_t_10);
25415  __pyx_t_11 = PyObject_GetItem(__pyx_t_10, __pyx_n_s_x); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1104, __pyx_L1_error)
25416  __Pyx_GOTREF(__pyx_t_11);
25417  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
25418 
25419  /* "ADR.pyx":1105
25420  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25421  * self.ebqe[('x')],
25422  * self.advectiveFluxBoundaryConditionsSetterDict[cj], # <<<<<<<<<<<<<<
25423  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
25424  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
25425  */
25426  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_advectiveFluxBoundaryConditionsS); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1105, __pyx_L1_error)
25427  __Pyx_GOTREF(__pyx_t_10);
25428  __pyx_t_12 = PyObject_GetItem(__pyx_t_10, __pyx_v_cj); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1105, __pyx_L1_error)
25429  __Pyx_GOTREF(__pyx_t_12);
25430  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
25431 
25432  /* "ADR.pyx":1106
25433  * self.ebqe[('x')],
25434  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
25435  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj])) # <<<<<<<<<<<<<<
25436  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
25437  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
25438  */
25439  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_diffusiveFluxBoundaryConditionsS); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1106, __pyx_L1_error)
25440  __Pyx_GOTREF(__pyx_t_10);
25441  __pyx_t_13 = PyObject_GetItem(__pyx_t_10, __pyx_v_cj); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1106, __pyx_L1_error)
25442  __Pyx_GOTREF(__pyx_t_13);
25443  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
25444  __pyx_t_10 = NULL;
25445  __pyx_t_6 = 0;
25446  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
25447  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
25448  if (likely(__pyx_t_10)) {
25449  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
25450  __Pyx_INCREF(__pyx_t_10);
25451  __Pyx_INCREF(function);
25452  __Pyx_DECREF_SET(__pyx_t_7, function);
25453  __pyx_t_6 = 1;
25454  }
25455  }
25456  #if CYTHON_FAST_PYCALL
25457  if (PyFunction_Check(__pyx_t_7)) {
25458  PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_t_5, __pyx_t_4, __pyx_t_11, __pyx_t_12, __pyx_t_13};
25459  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error)
25460  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
25461  __Pyx_GOTREF(__pyx_t_3);
25462  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25463  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25464  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
25465  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
25466  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
25467  } else
25468  #endif
25469  #if CYTHON_FAST_PYCCALL
25470  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
25471  PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_t_5, __pyx_t_4, __pyx_t_11, __pyx_t_12, __pyx_t_13};
25472  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error)
25473  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
25474  __Pyx_GOTREF(__pyx_t_3);
25475  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25476  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25477  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
25478  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
25479  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
25480  } else
25481  #endif
25482  {
25483  __pyx_t_14 = PyTuple_New(5+__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1102, __pyx_L1_error)
25484  __Pyx_GOTREF(__pyx_t_14);
25485  if (__pyx_t_10) {
25486  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __pyx_t_10 = NULL;
25487  }
25488  __Pyx_GIVEREF(__pyx_t_5);
25489  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_6, __pyx_t_5);
25490  __Pyx_GIVEREF(__pyx_t_4);
25491  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_6, __pyx_t_4);
25492  __Pyx_GIVEREF(__pyx_t_11);
25493  PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_6, __pyx_t_11);
25494  __Pyx_GIVEREF(__pyx_t_12);
25495  PyTuple_SET_ITEM(__pyx_t_14, 3+__pyx_t_6, __pyx_t_12);
25496  __Pyx_GIVEREF(__pyx_t_13);
25497  PyTuple_SET_ITEM(__pyx_t_14, 4+__pyx_t_6, __pyx_t_13);
25498  __pyx_t_5 = 0;
25499  __pyx_t_4 = 0;
25500  __pyx_t_11 = 0;
25501  __pyx_t_12 = 0;
25502  __pyx_t_13 = 0;
25503  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error)
25504  __Pyx_GOTREF(__pyx_t_3);
25505  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
25506  }
25507  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25508 
25509  /* "ADR.pyx":1102
25510  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25511  * self.ebqe['x'])
25512  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh, # <<<<<<<<<<<<<<
25513  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25514  * self.ebqe[('x')],
25515  */
25516  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1102, __pyx_L1_error)
25517  __Pyx_GOTREF(__pyx_t_7);
25518  __Pyx_INCREF(__pyx_v_cj);
25519  __Pyx_GIVEREF(__pyx_v_cj);
25520  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_cj);
25521  __Pyx_GIVEREF(__pyx_t_3);
25522  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
25523  __pyx_t_3 = 0;
25524  if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1102, __pyx_L1_error)
25525  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25526 
25527  /* "ADR.pyx":1107
25528  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
25529  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
25530  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()]) # <<<<<<<<<<<<<<
25531  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
25532  * def estimate_mt(self):
25533  */
25534  }
25535  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25536 
25537  /* "ADR.pyx":1102
25538  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25539  * self.ebqe['x'])
25540  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh, # <<<<<<<<<<<<<<
25541  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25542  * self.ebqe[('x')],
25543  */
25544  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __pyx_L1_error)
25545  __Pyx_GOTREF(__pyx_t_2);
25546  __Pyx_GIVEREF(__pyx_t_1);
25547  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
25548  __pyx_t_1 = 0;
25549  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyDict_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error)
25550  __Pyx_GOTREF(__pyx_t_1);
25551  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25552  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditionsObjectsDic, __pyx_t_1) < 0) __PYX_ERR(0, 1102, __pyx_L1_error)
25553  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25554 
25555  /* "ADR.pyx":1108
25556  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
25557  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
25558  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe) # <<<<<<<<<<<<<<
25559  * def estimate_mt(self):
25560  * pass
25561  */
25562  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1108, __pyx_L1_error)
25563  __Pyx_GOTREF(__pyx_t_2);
25564  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_initializeGlobalExteriorElementB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1108, __pyx_L1_error)
25565  __Pyx_GOTREF(__pyx_t_7);
25566  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25567  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1108, __pyx_L1_error)
25568  __Pyx_GOTREF(__pyx_t_2);
25569  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1108, __pyx_L1_error)
25570  __Pyx_GOTREF(__pyx_t_3);
25571  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25572  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1108, __pyx_L1_error)
25573  __Pyx_GOTREF(__pyx_t_2);
25574  __pyx_t_14 = NULL;
25575  __pyx_t_6 = 0;
25576  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
25577  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
25578  if (likely(__pyx_t_14)) {
25579  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
25580  __Pyx_INCREF(__pyx_t_14);
25581  __Pyx_INCREF(function);
25582  __Pyx_DECREF_SET(__pyx_t_7, function);
25583  __pyx_t_6 = 1;
25584  }
25585  }
25586  #if CYTHON_FAST_PYCALL
25587  if (PyFunction_Check(__pyx_t_7)) {
25588  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_3, __pyx_t_2};
25589  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error)
25590  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
25591  __Pyx_GOTREF(__pyx_t_1);
25592  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25593  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25594  } else
25595  #endif
25596  #if CYTHON_FAST_PYCCALL
25597  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
25598  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_3, __pyx_t_2};
25599  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error)
25600  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
25601  __Pyx_GOTREF(__pyx_t_1);
25602  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25603  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25604  } else
25605  #endif
25606  {
25607  __pyx_t_13 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1108, __pyx_L1_error)
25608  __Pyx_GOTREF(__pyx_t_13);
25609  if (__pyx_t_14) {
25610  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14); __pyx_t_14 = NULL;
25611  }
25612  __Pyx_GIVEREF(__pyx_t_3);
25613  PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_6, __pyx_t_3);
25614  __Pyx_GIVEREF(__pyx_t_2);
25615  PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_6, __pyx_t_2);
25616  __pyx_t_3 = 0;
25617  __pyx_t_2 = 0;
25618  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error)
25619  __Pyx_GOTREF(__pyx_t_1);
25620  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
25621  }
25622  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25623  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25624 
25625  /* "ADR.pyx":1095
25626  * def calculateElementBoundaryQuadrature(self):
25627  * pass
25628  * def calculateExteriorElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
25629  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
25630  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25631  */
25632 
25633  /* function exit code */
25634  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25635  goto __pyx_L0;
25636  __pyx_L1_error:;
25637  __Pyx_XDECREF(__pyx_t_1);
25638  __Pyx_XDECREF(__pyx_t_2);
25639  __Pyx_XDECREF(__pyx_t_3);
25640  __Pyx_XDECREF(__pyx_t_4);
25641  __Pyx_XDECREF(__pyx_t_5);
25642  __Pyx_XDECREF(__pyx_t_7);
25643  __Pyx_XDECREF(__pyx_t_10);
25644  __Pyx_XDECREF(__pyx_t_11);
25645  __Pyx_XDECREF(__pyx_t_12);
25646  __Pyx_XDECREF(__pyx_t_13);
25647  __Pyx_XDECREF(__pyx_t_14);
25648  __Pyx_AddTraceback("ADR.LevelModel.calculateExteriorElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
25649  __pyx_r = NULL;
25650  __pyx_L0:;
25651  __Pyx_XDECREF(__pyx_v_cj);
25652  __Pyx_XGIVEREF(__pyx_r);
25653  __Pyx_RefNannyFinishContext();
25654  return __pyx_r;
25655 }
25656 
25657 /* "ADR.pyx":1109
25658  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
25659  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
25660  * def estimate_mt(self): # <<<<<<<<<<<<<<
25661  * pass
25662  * def calculateAuxiliaryQuantitiesAfterStep(self):
25663  */
25664 
25665 /* Python wrapper */
25666 static PyObject *__pyx_pw_3ADR_10LevelModel_15estimate_mt(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
25667 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_15estimate_mt = {"estimate_mt", (PyCFunction)__pyx_pw_3ADR_10LevelModel_15estimate_mt, METH_O, 0};
25668 static PyObject *__pyx_pw_3ADR_10LevelModel_15estimate_mt(PyObject *__pyx_self, PyObject *__pyx_v_self) {
25669  PyObject *__pyx_r = 0;
25670  __Pyx_RefNannyDeclarations
25671  __Pyx_RefNannySetupContext("estimate_mt (wrapper)", 0);
25672  __pyx_r = __pyx_pf_3ADR_10LevelModel_14estimate_mt(__pyx_self, ((PyObject *)__pyx_v_self));
25673 
25674  /* function exit code */
25675  __Pyx_RefNannyFinishContext();
25676  return __pyx_r;
25677 }
25678 
25679 static PyObject *__pyx_pf_3ADR_10LevelModel_14estimate_mt(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
25680  PyObject *__pyx_r = NULL;
25681  __Pyx_RefNannyDeclarations
25682  __Pyx_RefNannySetupContext("estimate_mt", 0);
25683 
25684  /* function exit code */
25685  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25686  __Pyx_XGIVEREF(__pyx_r);
25687  __Pyx_RefNannyFinishContext();
25688  return __pyx_r;
25689 }
25690 
25691 /* "ADR.pyx":1111
25692  * def estimate_mt(self):
25693  * pass
25694  * def calculateAuxiliaryQuantitiesAfterStep(self): # <<<<<<<<<<<<<<
25695  * pass
25696  * def calculateSolutionAtQuadrature(self):
25697  */
25698 
25699 /* Python wrapper */
25700 static PyObject *__pyx_pw_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
25701 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep = {"calculateAuxiliaryQuantitiesAfterStep", (PyCFunction)__pyx_pw_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep, METH_O, 0};
25702 static PyObject *__pyx_pw_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep(PyObject *__pyx_self, PyObject *__pyx_v_self) {
25703  PyObject *__pyx_r = 0;
25704  __Pyx_RefNannyDeclarations
25705  __Pyx_RefNannySetupContext("calculateAuxiliaryQuantitiesAfterStep (wrapper)", 0);
25706  __pyx_r = __pyx_pf_3ADR_10LevelModel_16calculateAuxiliaryQuantitiesAfterStep(__pyx_self, ((PyObject *)__pyx_v_self));
25707 
25708  /* function exit code */
25709  __Pyx_RefNannyFinishContext();
25710  return __pyx_r;
25711 }
25712 
25713 static PyObject *__pyx_pf_3ADR_10LevelModel_16calculateAuxiliaryQuantitiesAfterStep(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
25714  PyObject *__pyx_r = NULL;
25715  __Pyx_RefNannyDeclarations
25716  __Pyx_RefNannySetupContext("calculateAuxiliaryQuantitiesAfterStep", 0);
25717 
25718  /* function exit code */
25719  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25720  __Pyx_XGIVEREF(__pyx_r);
25721  __Pyx_RefNannyFinishContext();
25722  return __pyx_r;
25723 }
25724 
25725 /* "ADR.pyx":1113
25726  * def calculateAuxiliaryQuantitiesAfterStep(self):
25727  * pass
25728  * def calculateSolutionAtQuadrature(self): # <<<<<<<<<<<<<<
25729  * pass
25730  */
25731 
25732 /* Python wrapper */
25733 static PyObject *__pyx_pw_3ADR_10LevelModel_19calculateSolutionAtQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
25734 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_19calculateSolutionAtQuadrature = {"calculateSolutionAtQuadrature", (PyCFunction)__pyx_pw_3ADR_10LevelModel_19calculateSolutionAtQuadrature, METH_O, 0};
25735 static PyObject *__pyx_pw_3ADR_10LevelModel_19calculateSolutionAtQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
25736  PyObject *__pyx_r = 0;
25737  __Pyx_RefNannyDeclarations
25738  __Pyx_RefNannySetupContext("calculateSolutionAtQuadrature (wrapper)", 0);
25739  __pyx_r = __pyx_pf_3ADR_10LevelModel_18calculateSolutionAtQuadrature(__pyx_self, ((PyObject *)__pyx_v_self));
25740 
25741  /* function exit code */
25742  __Pyx_RefNannyFinishContext();
25743  return __pyx_r;
25744 }
25745 
25746 static PyObject *__pyx_pf_3ADR_10LevelModel_18calculateSolutionAtQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
25747  PyObject *__pyx_r = NULL;
25748  __Pyx_RefNannyDeclarations
25749  __Pyx_RefNannySetupContext("calculateSolutionAtQuadrature", 0);
25750 
25751  /* function exit code */
25752  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25753  __Pyx_XGIVEREF(__pyx_r);
25754  __Pyx_RefNannyFinishContext();
25755  return __pyx_r;
25756 }
25757 
25758 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197
25759  * # experimental exception made for __getbuffer__ and __releasebuffer__
25760  * # -- the details of this may change.
25761  * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
25762  * # This implementation of getbuffer is geared towards Cython
25763  * # requirements, and does not yet fullfill the PEP.
25764  */
25765 
25766 /* Python wrapper */
25767 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
25768 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
25769  int __pyx_r;
25770  __Pyx_RefNannyDeclarations
25771  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
25772  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
25773 
25774  /* function exit code */
25775  __Pyx_RefNannyFinishContext();
25776  return __pyx_r;
25777 }
25778 
25779 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
25780  int __pyx_v_copy_shape;
25781  int __pyx_v_i;
25782  int __pyx_v_ndim;
25783  int __pyx_v_endian_detector;
25784  int __pyx_v_little_endian;
25785  int __pyx_v_t;
25786  char *__pyx_v_f;
25787  PyArray_Descr *__pyx_v_descr = 0;
25788  int __pyx_v_offset;
25789  int __pyx_v_hasfields;
25790  int __pyx_r;
25791  __Pyx_RefNannyDeclarations
25792  int __pyx_t_1;
25793  int __pyx_t_2;
25794  PyObject *__pyx_t_3 = NULL;
25795  int __pyx_t_4;
25796  int __pyx_t_5;
25797  PyObject *__pyx_t_6 = NULL;
25798  char *__pyx_t_7;
25799  __Pyx_RefNannySetupContext("__getbuffer__", 0);
25800  if (__pyx_v_info != NULL) {
25801  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
25802  __Pyx_GIVEREF(__pyx_v_info->obj);
25803  }
25804 
25805  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":203
25806  * # of flags
25807  *
25808  * if info == NULL: return # <<<<<<<<<<<<<<
25809  *
25810  * cdef int copy_shape, i, ndim
25811  */
25812  __pyx_t_1 = ((__pyx_v_info == NULL) != 0);
25813  if (__pyx_t_1) {
25814  __pyx_r = 0;
25815  goto __pyx_L0;
25816  }
25817 
25818  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":206
25819  *
25820  * cdef int copy_shape, i, ndim
25821  * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
25822  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
25823  *
25824  */
25825  __pyx_v_endian_detector = 1;
25826 
25827  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":207
25828  * cdef int copy_shape, i, ndim
25829  * cdef int endian_detector = 1
25830  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
25831  *
25832  * ndim = PyArray_NDIM(self)
25833  */
25834  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
25835 
25836  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":209
25837  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
25838  *
25839  * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
25840  *
25841  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
25842  */
25843  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
25844 
25845  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211
25846  * ndim = PyArray_NDIM(self)
25847  *
25848  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
25849  * copy_shape = 1
25850  * else:
25851  */
25852  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
25853  if (__pyx_t_1) {
25854 
25855  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":212
25856  *
25857  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
25858  * copy_shape = 1 # <<<<<<<<<<<<<<
25859  * else:
25860  * copy_shape = 0
25861  */
25862  __pyx_v_copy_shape = 1;
25863 
25864  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211
25865  * ndim = PyArray_NDIM(self)
25866  *
25867  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
25868  * copy_shape = 1
25869  * else:
25870  */
25871  goto __pyx_L4;
25872  }
25873 
25874  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":214
25875  * copy_shape = 1
25876  * else:
25877  * copy_shape = 0 # <<<<<<<<<<<<<<
25878  *
25879  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25880  */
25881  /*else*/ {
25882  __pyx_v_copy_shape = 0;
25883  }
25884  __pyx_L4:;
25885 
25886  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
25887  * copy_shape = 0
25888  *
25889  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
25890  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
25891  * raise ValueError(u"ndarray is not C contiguous")
25892  */
25893  __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
25894  if (__pyx_t_2) {
25895  } else {
25896  __pyx_t_1 = __pyx_t_2;
25897  goto __pyx_L6_bool_binop_done;
25898  }
25899 
25900  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":217
25901  *
25902  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25903  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
25904  * raise ValueError(u"ndarray is not C contiguous")
25905  *
25906  */
25907  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
25908  __pyx_t_1 = __pyx_t_2;
25909  __pyx_L6_bool_binop_done:;
25910 
25911  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
25912  * copy_shape = 0
25913  *
25914  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
25915  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
25916  * raise ValueError(u"ndarray is not C contiguous")
25917  */
25918  if (__pyx_t_1) {
25919 
25920  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218
25921  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25922  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
25923  * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
25924  *
25925  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25926  */
25927  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 218, __pyx_L1_error)
25928  __Pyx_GOTREF(__pyx_t_3);
25929  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25930  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25931  __PYX_ERR(1, 218, __pyx_L1_error)
25932 
25933  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
25934  * copy_shape = 0
25935  *
25936  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
25937  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
25938  * raise ValueError(u"ndarray is not C contiguous")
25939  */
25940  }
25941 
25942  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
25943  * raise ValueError(u"ndarray is not C contiguous")
25944  *
25945  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
25946  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
25947  * raise ValueError(u"ndarray is not Fortran contiguous")
25948  */
25949  __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
25950  if (__pyx_t_2) {
25951  } else {
25952  __pyx_t_1 = __pyx_t_2;
25953  goto __pyx_L9_bool_binop_done;
25954  }
25955 
25956  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":221
25957  *
25958  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25959  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
25960  * raise ValueError(u"ndarray is not Fortran contiguous")
25961  *
25962  */
25963  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
25964  __pyx_t_1 = __pyx_t_2;
25965  __pyx_L9_bool_binop_done:;
25966 
25967  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
25968  * raise ValueError(u"ndarray is not C contiguous")
25969  *
25970  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
25971  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
25972  * raise ValueError(u"ndarray is not Fortran contiguous")
25973  */
25974  if (__pyx_t_1) {
25975 
25976  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222
25977  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25978  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
25979  * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
25980  *
25981  * info.buf = PyArray_DATA(self)
25982  */
25983  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 222, __pyx_L1_error)
25984  __Pyx_GOTREF(__pyx_t_3);
25985  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25986  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25987  __PYX_ERR(1, 222, __pyx_L1_error)
25988 
25989  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
25990  * raise ValueError(u"ndarray is not C contiguous")
25991  *
25992  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
25993  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
25994  * raise ValueError(u"ndarray is not Fortran contiguous")
25995  */
25996  }
25997 
25998  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":224
25999  * raise ValueError(u"ndarray is not Fortran contiguous")
26000  *
26001  * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
26002  * info.ndim = ndim
26003  * if copy_shape:
26004  */
26005  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
26006 
26007  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":225
26008  *
26009  * info.buf = PyArray_DATA(self)
26010  * info.ndim = ndim # <<<<<<<<<<<<<<
26011  * if copy_shape:
26012  * # Allocate new buffer for strides and shape info.
26013  */
26014  __pyx_v_info->ndim = __pyx_v_ndim;
26015 
26016  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226
26017  * info.buf = PyArray_DATA(self)
26018  * info.ndim = ndim
26019  * if copy_shape: # <<<<<<<<<<<<<<
26020  * # Allocate new buffer for strides and shape info.
26021  * # This is allocated as one block, strides first.
26022  */
26023  __pyx_t_1 = (__pyx_v_copy_shape != 0);
26024  if (__pyx_t_1) {
26025 
26026  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":229
26027  * # Allocate new buffer for strides and shape info.
26028  * # This is allocated as one block, strides first.
26029  * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2) # <<<<<<<<<<<<<<
26030  * info.shape = info.strides + ndim
26031  * for i in range(ndim):
26032  */
26033  __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));
26034 
26035  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":230
26036  * # This is allocated as one block, strides first.
26037  * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
26038  * info.shape = info.strides + ndim # <<<<<<<<<<<<<<
26039  * for i in range(ndim):
26040  * info.strides[i] = PyArray_STRIDES(self)[i]
26041  */
26042  __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
26043 
26044  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":231
26045  * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
26046  * info.shape = info.strides + ndim
26047  * for i in range(ndim): # <<<<<<<<<<<<<<
26048  * info.strides[i] = PyArray_STRIDES(self)[i]
26049  * info.shape[i] = PyArray_DIMS(self)[i]
26050  */
26051  __pyx_t_4 = __pyx_v_ndim;
26052  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
26053  __pyx_v_i = __pyx_t_5;
26054 
26055  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":232
26056  * info.shape = info.strides + ndim
26057  * for i in range(ndim):
26058  * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
26059  * info.shape[i] = PyArray_DIMS(self)[i]
26060  * else:
26061  */
26062  (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
26063 
26064  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":233
26065  * for i in range(ndim):
26066  * info.strides[i] = PyArray_STRIDES(self)[i]
26067  * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
26068  * else:
26069  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
26070  */
26071  (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
26072  }
26073 
26074  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226
26075  * info.buf = PyArray_DATA(self)
26076  * info.ndim = ndim
26077  * if copy_shape: # <<<<<<<<<<<<<<
26078  * # Allocate new buffer for strides and shape info.
26079  * # This is allocated as one block, strides first.
26080  */
26081  goto __pyx_L11;
26082  }
26083 
26084  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":235
26085  * info.shape[i] = PyArray_DIMS(self)[i]
26086  * else:
26087  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
26088  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
26089  * info.suboffsets = NULL
26090  */
26091  /*else*/ {
26092  __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
26093 
26094  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":236
26095  * else:
26096  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
26097  * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
26098  * info.suboffsets = NULL
26099  * info.itemsize = PyArray_ITEMSIZE(self)
26100  */
26101  __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
26102  }
26103  __pyx_L11:;
26104 
26105  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":237
26106  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
26107  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
26108  * info.suboffsets = NULL # <<<<<<<<<<<<<<
26109  * info.itemsize = PyArray_ITEMSIZE(self)
26110  * info.readonly = not PyArray_ISWRITEABLE(self)
26111  */
26112  __pyx_v_info->suboffsets = NULL;
26113 
26114  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":238
26115  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
26116  * info.suboffsets = NULL
26117  * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
26118  * info.readonly = not PyArray_ISWRITEABLE(self)
26119  *
26120  */
26121  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
26122 
26123  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":239
26124  * info.suboffsets = NULL
26125  * info.itemsize = PyArray_ITEMSIZE(self)
26126  * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
26127  *
26128  * cdef int t
26129  */
26130  __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
26131 
26132  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":242
26133  *
26134  * cdef int t
26135  * cdef char* f = NULL # <<<<<<<<<<<<<<
26136  * cdef dtype descr = self.descr
26137  * cdef int offset
26138  */
26139  __pyx_v_f = NULL;
26140 
26141  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":243
26142  * cdef int t
26143  * cdef char* f = NULL
26144  * cdef dtype descr = self.descr # <<<<<<<<<<<<<<
26145  * cdef int offset
26146  *
26147  */
26148  __pyx_t_3 = ((PyObject *)__pyx_v_self->descr);
26149  __Pyx_INCREF(__pyx_t_3);
26150  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
26151  __pyx_t_3 = 0;
26152 
26153  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":246
26154  * cdef int offset
26155  *
26156  * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<<
26157  *
26158  * if not hasfields and not copy_shape:
26159  */
26160  __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
26161 
26162  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248
26163  * cdef bint hasfields = PyDataType_HASFIELDS(descr)
26164  *
26165  * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
26166  * # do not call releasebuffer
26167  * info.obj = None
26168  */
26169  __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0);
26170  if (__pyx_t_2) {
26171  } else {
26172  __pyx_t_1 = __pyx_t_2;
26173  goto __pyx_L15_bool_binop_done;
26174  }
26175  __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0);
26176  __pyx_t_1 = __pyx_t_2;
26177  __pyx_L15_bool_binop_done:;
26178  if (__pyx_t_1) {
26179 
26180  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":250
26181  * if not hasfields and not copy_shape:
26182  * # do not call releasebuffer
26183  * info.obj = None # <<<<<<<<<<<<<<
26184  * else:
26185  * # need to call releasebuffer
26186  */
26187  __Pyx_INCREF(Py_None);
26188  __Pyx_GIVEREF(Py_None);
26189  __Pyx_GOTREF(__pyx_v_info->obj);
26190  __Pyx_DECREF(__pyx_v_info->obj);
26191  __pyx_v_info->obj = Py_None;
26192 
26193  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248
26194  * cdef bint hasfields = PyDataType_HASFIELDS(descr)
26195  *
26196  * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
26197  * # do not call releasebuffer
26198  * info.obj = None
26199  */
26200  goto __pyx_L14;
26201  }
26202 
26203  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":253
26204  * else:
26205  * # need to call releasebuffer
26206  * info.obj = self # <<<<<<<<<<<<<<
26207  *
26208  * if not hasfields:
26209  */
26210  /*else*/ {
26211  __Pyx_INCREF(((PyObject *)__pyx_v_self));
26212  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
26213  __Pyx_GOTREF(__pyx_v_info->obj);
26214  __Pyx_DECREF(__pyx_v_info->obj);
26215  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
26216  }
26217  __pyx_L14:;
26218 
26219  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255
26220  * info.obj = self
26221  *
26222  * if not hasfields: # <<<<<<<<<<<<<<
26223  * t = descr.type_num
26224  * if ((descr.byteorder == c'>' and little_endian) or
26225  */
26226  __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
26227  if (__pyx_t_1) {
26228 
26229  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":256
26230  *
26231  * if not hasfields:
26232  * t = descr.type_num # <<<<<<<<<<<<<<
26233  * if ((descr.byteorder == c'>' and little_endian) or
26234  * (descr.byteorder == c'<' and not little_endian)):
26235  */
26236  __pyx_t_4 = __pyx_v_descr->type_num;
26237  __pyx_v_t = __pyx_t_4;
26238 
26239  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
26240  * if not hasfields:
26241  * t = descr.type_num
26242  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
26243  * (descr.byteorder == c'<' and not little_endian)):
26244  * raise ValueError(u"Non-native byte order not supported")
26245  */
26246  __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
26247  if (!__pyx_t_2) {
26248  goto __pyx_L20_next_or;
26249  } else {
26250  }
26251  __pyx_t_2 = (__pyx_v_little_endian != 0);
26252  if (!__pyx_t_2) {
26253  } else {
26254  __pyx_t_1 = __pyx_t_2;
26255  goto __pyx_L19_bool_binop_done;
26256  }
26257  __pyx_L20_next_or:;
26258 
26259  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
26260  * t = descr.type_num
26261  * if ((descr.byteorder == c'>' and little_endian) or
26262  * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
26263  * raise ValueError(u"Non-native byte order not supported")
26264  * if t == NPY_BYTE: f = "b"
26265  */
26266  __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
26267  if (__pyx_t_2) {
26268  } else {
26269  __pyx_t_1 = __pyx_t_2;
26270  goto __pyx_L19_bool_binop_done;
26271  }
26272  __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
26273  __pyx_t_1 = __pyx_t_2;
26274  __pyx_L19_bool_binop_done:;
26275 
26276  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
26277  * if not hasfields:
26278  * t = descr.type_num
26279  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
26280  * (descr.byteorder == c'<' and not little_endian)):
26281  * raise ValueError(u"Non-native byte order not supported")
26282  */
26283  if (__pyx_t_1) {
26284 
26285  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
26286  * if ((descr.byteorder == c'>' and little_endian) or
26287  * (descr.byteorder == c'<' and not little_endian)):
26288  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
26289  * if t == NPY_BYTE: f = "b"
26290  * elif t == NPY_UBYTE: f = "B"
26291  */
26292  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 259, __pyx_L1_error)
26293  __Pyx_GOTREF(__pyx_t_3);
26294  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
26295  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26296  __PYX_ERR(1, 259, __pyx_L1_error)
26297 
26298  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
26299  * if not hasfields:
26300  * t = descr.type_num
26301  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
26302  * (descr.byteorder == c'<' and not little_endian)):
26303  * raise ValueError(u"Non-native byte order not supported")
26304  */
26305  }
26306 
26307  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260
26308  * (descr.byteorder == c'<' and not little_endian)):
26309  * raise ValueError(u"Non-native byte order not supported")
26310  * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
26311  * elif t == NPY_UBYTE: f = "B"
26312  * elif t == NPY_SHORT: f = "h"
26313  */
26314  switch (__pyx_v_t) {
26315  case NPY_BYTE:
26316  __pyx_v_f = ((char *)"b");
26317  break;
26318 
26319  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261
26320  * raise ValueError(u"Non-native byte order not supported")
26321  * if t == NPY_BYTE: f = "b"
26322  * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
26323  * elif t == NPY_SHORT: f = "h"
26324  * elif t == NPY_USHORT: f = "H"
26325  */
26326  case NPY_UBYTE:
26327  __pyx_v_f = ((char *)"B");
26328  break;
26329 
26330  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":262
26331  * if t == NPY_BYTE: f = "b"
26332  * elif t == NPY_UBYTE: f = "B"
26333  * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
26334  * elif t == NPY_USHORT: f = "H"
26335  * elif t == NPY_INT: f = "i"
26336  */
26337  case NPY_SHORT:
26338  __pyx_v_f = ((char *)"h");
26339  break;
26340 
26341  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":263
26342  * elif t == NPY_UBYTE: f = "B"
26343  * elif t == NPY_SHORT: f = "h"
26344  * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
26345  * elif t == NPY_INT: f = "i"
26346  * elif t == NPY_UINT: f = "I"
26347  */
26348  case NPY_USHORT:
26349  __pyx_v_f = ((char *)"H");
26350  break;
26351 
26352  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":264
26353  * elif t == NPY_SHORT: f = "h"
26354  * elif t == NPY_USHORT: f = "H"
26355  * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
26356  * elif t == NPY_UINT: f = "I"
26357  * elif t == NPY_LONG: f = "l"
26358  */
26359  case NPY_INT:
26360  __pyx_v_f = ((char *)"i");
26361  break;
26362 
26363  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
26364  * elif t == NPY_USHORT: f = "H"
26365  * elif t == NPY_INT: f = "i"
26366  * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
26367  * elif t == NPY_LONG: f = "l"
26368  * elif t == NPY_ULONG: f = "L"
26369  */
26370  case NPY_UINT:
26371  __pyx_v_f = ((char *)"I");
26372  break;
26373 
26374  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
26375  * elif t == NPY_INT: f = "i"
26376  * elif t == NPY_UINT: f = "I"
26377  * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
26378  * elif t == NPY_ULONG: f = "L"
26379  * elif t == NPY_LONGLONG: f = "q"
26380  */
26381  case NPY_LONG:
26382  __pyx_v_f = ((char *)"l");
26383  break;
26384 
26385  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":267
26386  * elif t == NPY_UINT: f = "I"
26387  * elif t == NPY_LONG: f = "l"
26388  * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
26389  * elif t == NPY_LONGLONG: f = "q"
26390  * elif t == NPY_ULONGLONG: f = "Q"
26391  */
26392  case NPY_ULONG:
26393  __pyx_v_f = ((char *)"L");
26394  break;
26395 
26396  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
26397  * elif t == NPY_LONG: f = "l"
26398  * elif t == NPY_ULONG: f = "L"
26399  * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
26400  * elif t == NPY_ULONGLONG: f = "Q"
26401  * elif t == NPY_FLOAT: f = "f"
26402  */
26403  case NPY_LONGLONG:
26404  __pyx_v_f = ((char *)"q");
26405  break;
26406 
26407  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":269
26408  * elif t == NPY_ULONG: f = "L"
26409  * elif t == NPY_LONGLONG: f = "q"
26410  * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
26411  * elif t == NPY_FLOAT: f = "f"
26412  * elif t == NPY_DOUBLE: f = "d"
26413  */
26414  case NPY_ULONGLONG:
26415  __pyx_v_f = ((char *)"Q");
26416  break;
26417 
26418  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
26419  * elif t == NPY_LONGLONG: f = "q"
26420  * elif t == NPY_ULONGLONG: f = "Q"
26421  * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
26422  * elif t == NPY_DOUBLE: f = "d"
26423  * elif t == NPY_LONGDOUBLE: f = "g"
26424  */
26425  case NPY_FLOAT:
26426  __pyx_v_f = ((char *)"f");
26427  break;
26428 
26429  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
26430  * elif t == NPY_ULONGLONG: f = "Q"
26431  * elif t == NPY_FLOAT: f = "f"
26432  * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
26433  * elif t == NPY_LONGDOUBLE: f = "g"
26434  * elif t == NPY_CFLOAT: f = "Zf"
26435  */
26436  case NPY_DOUBLE:
26437  __pyx_v_f = ((char *)"d");
26438  break;
26439 
26440  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
26441  * elif t == NPY_FLOAT: f = "f"
26442  * elif t == NPY_DOUBLE: f = "d"
26443  * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
26444  * elif t == NPY_CFLOAT: f = "Zf"
26445  * elif t == NPY_CDOUBLE: f = "Zd"
26446  */
26447  case NPY_LONGDOUBLE:
26448  __pyx_v_f = ((char *)"g");
26449  break;
26450 
26451  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":273
26452  * elif t == NPY_DOUBLE: f = "d"
26453  * elif t == NPY_LONGDOUBLE: f = "g"
26454  * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
26455  * elif t == NPY_CDOUBLE: f = "Zd"
26456  * elif t == NPY_CLONGDOUBLE: f = "Zg"
26457  */
26458  case NPY_CFLOAT:
26459  __pyx_v_f = ((char *)"Zf");
26460  break;
26461 
26462  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
26463  * elif t == NPY_LONGDOUBLE: f = "g"
26464  * elif t == NPY_CFLOAT: f = "Zf"
26465  * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
26466  * elif t == NPY_CLONGDOUBLE: f = "Zg"
26467  * elif t == NPY_OBJECT: f = "O"
26468  */
26469  case NPY_CDOUBLE:
26470  __pyx_v_f = ((char *)"Zd");
26471  break;
26472 
26473  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":275
26474  * elif t == NPY_CFLOAT: f = "Zf"
26475  * elif t == NPY_CDOUBLE: f = "Zd"
26476  * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
26477  * elif t == NPY_OBJECT: f = "O"
26478  * else:
26479  */
26480  case NPY_CLONGDOUBLE:
26481  __pyx_v_f = ((char *)"Zg");
26482  break;
26483 
26484  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
26485  * elif t == NPY_CDOUBLE: f = "Zd"
26486  * elif t == NPY_CLONGDOUBLE: f = "Zg"
26487  * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
26488  * else:
26489  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26490  */
26491  case NPY_OBJECT:
26492  __pyx_v_f = ((char *)"O");
26493  break;
26494  default:
26495 
26496  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
26497  * elif t == NPY_OBJECT: f = "O"
26498  * else:
26499  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
26500  * info.format = f
26501  * return
26502  */
26503  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
26504  __Pyx_GOTREF(__pyx_t_3);
26505  __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
26506  __Pyx_GOTREF(__pyx_t_6);
26507  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26508  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
26509  __Pyx_GOTREF(__pyx_t_3);
26510  __Pyx_GIVEREF(__pyx_t_6);
26511  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
26512  __pyx_t_6 = 0;
26513  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
26514  __Pyx_GOTREF(__pyx_t_6);
26515  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26516  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
26517  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26518  __PYX_ERR(1, 278, __pyx_L1_error)
26519  break;
26520  }
26521 
26522  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":279
26523  * else:
26524  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26525  * info.format = f # <<<<<<<<<<<<<<
26526  * return
26527  * else:
26528  */
26529  __pyx_v_info->format = __pyx_v_f;
26530 
26531  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
26532  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26533  * info.format = f
26534  * return # <<<<<<<<<<<<<<
26535  * else:
26536  * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
26537  */
26538  __pyx_r = 0;
26539  goto __pyx_L0;
26540 
26541  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255
26542  * info.obj = self
26543  *
26544  * if not hasfields: # <<<<<<<<<<<<<<
26545  * t = descr.type_num
26546  * if ((descr.byteorder == c'>' and little_endian) or
26547  */
26548  }
26549 
26550  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":282
26551  * return
26552  * else:
26553  * info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
26554  * info.format[0] = c'^' # Native data types, manual alignment
26555  * offset = 0
26556  */
26557  /*else*/ {
26558  __pyx_v_info->format = ((char *)malloc(0xFF));
26559 
26560  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
26561  * else:
26562  * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
26563  * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
26564  * offset = 0
26565  * f = _util_dtypestring(descr, info.format + 1,
26566  */
26567  (__pyx_v_info->format[0]) = '^';
26568 
26569  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":284
26570  * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
26571  * info.format[0] = c'^' # Native data types, manual alignment
26572  * offset = 0 # <<<<<<<<<<<<<<
26573  * f = _util_dtypestring(descr, info.format + 1,
26574  * info.format + _buffer_format_string_len,
26575  */
26576  __pyx_v_offset = 0;
26577 
26578  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":285
26579  * info.format[0] = c'^' # Native data types, manual alignment
26580  * offset = 0
26581  * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
26582  * info.format + _buffer_format_string_len,
26583  * &offset)
26584  */
26585  __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) __PYX_ERR(1, 285, __pyx_L1_error)
26586  __pyx_v_f = __pyx_t_7;
26587 
26588  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288
26589  * info.format + _buffer_format_string_len,
26590  * &offset)
26591  * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
26592  *
26593  * def __releasebuffer__(ndarray self, Py_buffer* info):
26594  */
26595  (__pyx_v_f[0]) = '\x00';
26596  }
26597 
26598  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197
26599  * # experimental exception made for __getbuffer__ and __releasebuffer__
26600  * # -- the details of this may change.
26601  * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
26602  * # This implementation of getbuffer is geared towards Cython
26603  * # requirements, and does not yet fullfill the PEP.
26604  */
26605 
26606  /* function exit code */
26607  __pyx_r = 0;
26608  goto __pyx_L0;
26609  __pyx_L1_error:;
26610  __Pyx_XDECREF(__pyx_t_3);
26611  __Pyx_XDECREF(__pyx_t_6);
26612  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26613  __pyx_r = -1;
26614  if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
26615  __Pyx_GOTREF(__pyx_v_info->obj);
26616  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
26617  }
26618  goto __pyx_L2;
26619  __pyx_L0:;
26620  if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
26621  __Pyx_GOTREF(Py_None);
26622  __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
26623  }
26624  __pyx_L2:;
26625  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
26626  __Pyx_RefNannyFinishContext();
26627  return __pyx_r;
26628 }
26629 
26630 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
26631  * f[0] = c'\0' # Terminate format string
26632  *
26633  * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
26634  * if PyArray_HASFIELDS(self):
26635  * stdlib.free(info.format)
26636  */
26637 
26638 /* Python wrapper */
26639 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
26640 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
26641  __Pyx_RefNannyDeclarations
26642  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
26643  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
26644 
26645  /* function exit code */
26646  __Pyx_RefNannyFinishContext();
26647 }
26648 
26649 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
26650  __Pyx_RefNannyDeclarations
26651  int __pyx_t_1;
26652  __Pyx_RefNannySetupContext("__releasebuffer__", 0);
26653 
26654  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
26655  *
26656  * def __releasebuffer__(ndarray self, Py_buffer* info):
26657  * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
26658  * stdlib.free(info.format)
26659  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
26660  */
26661  __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
26662  if (__pyx_t_1) {
26663 
26664  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
26665  * def __releasebuffer__(ndarray self, Py_buffer* info):
26666  * if PyArray_HASFIELDS(self):
26667  * stdlib.free(info.format) # <<<<<<<<<<<<<<
26668  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
26669  * stdlib.free(info.strides)
26670  */
26671  free(__pyx_v_info->format);
26672 
26673  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
26674  *
26675  * def __releasebuffer__(ndarray self, Py_buffer* info):
26676  * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
26677  * stdlib.free(info.format)
26678  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
26679  */
26680  }
26681 
26682  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
26683  * if PyArray_HASFIELDS(self):
26684  * stdlib.free(info.format)
26685  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
26686  * stdlib.free(info.strides)
26687  * # info.shape was stored after info.strides in the same block
26688  */
26689  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
26690  if (__pyx_t_1) {
26691 
26692  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":294
26693  * stdlib.free(info.format)
26694  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
26695  * stdlib.free(info.strides) # <<<<<<<<<<<<<<
26696  * # info.shape was stored after info.strides in the same block
26697  *
26698  */
26699  free(__pyx_v_info->strides);
26700 
26701  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
26702  * if PyArray_HASFIELDS(self):
26703  * stdlib.free(info.format)
26704  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
26705  * stdlib.free(info.strides)
26706  * # info.shape was stored after info.strides in the same block
26707  */
26708  }
26709 
26710  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
26711  * f[0] = c'\0' # Terminate format string
26712  *
26713  * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
26714  * if PyArray_HASFIELDS(self):
26715  * stdlib.free(info.format)
26716  */
26717 
26718  /* function exit code */
26719  __Pyx_RefNannyFinishContext();
26720 }
26721 
26722 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770
26723  * ctypedef npy_cdouble complex_t
26724  *
26725  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
26726  * return PyArray_MultiIterNew(1, <void*>a)
26727  *
26728  */
26729 
26730 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
26731  PyObject *__pyx_r = NULL;
26732  __Pyx_RefNannyDeclarations
26733  PyObject *__pyx_t_1 = NULL;
26734  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
26735 
26736  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771
26737  *
26738  * cdef inline object PyArray_MultiIterNew1(a):
26739  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
26740  *
26741  * cdef inline object PyArray_MultiIterNew2(a, b):
26742  */
26743  __Pyx_XDECREF(__pyx_r);
26744  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 771, __pyx_L1_error)
26745  __Pyx_GOTREF(__pyx_t_1);
26746  __pyx_r = __pyx_t_1;
26747  __pyx_t_1 = 0;
26748  goto __pyx_L0;
26749 
26750  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770
26751  * ctypedef npy_cdouble complex_t
26752  *
26753  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
26754  * return PyArray_MultiIterNew(1, <void*>a)
26755  *
26756  */
26757 
26758  /* function exit code */
26759  __pyx_L1_error:;
26760  __Pyx_XDECREF(__pyx_t_1);
26761  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
26762  __pyx_r = 0;
26763  __pyx_L0:;
26764  __Pyx_XGIVEREF(__pyx_r);
26765  __Pyx_RefNannyFinishContext();
26766  return __pyx_r;
26767 }
26768 
26769 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773
26770  * return PyArray_MultiIterNew(1, <void*>a)
26771  *
26772  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
26773  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26774  *
26775  */
26776 
26777 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
26778  PyObject *__pyx_r = NULL;
26779  __Pyx_RefNannyDeclarations
26780  PyObject *__pyx_t_1 = NULL;
26781  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
26782 
26783  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774
26784  *
26785  * cdef inline object PyArray_MultiIterNew2(a, b):
26786  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
26787  *
26788  * cdef inline object PyArray_MultiIterNew3(a, b, c):
26789  */
26790  __Pyx_XDECREF(__pyx_r);
26791  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 774, __pyx_L1_error)
26792  __Pyx_GOTREF(__pyx_t_1);
26793  __pyx_r = __pyx_t_1;
26794  __pyx_t_1 = 0;
26795  goto __pyx_L0;
26796 
26797  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773
26798  * return PyArray_MultiIterNew(1, <void*>a)
26799  *
26800  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
26801  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26802  *
26803  */
26804 
26805  /* function exit code */
26806  __pyx_L1_error:;
26807  __Pyx_XDECREF(__pyx_t_1);
26808  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
26809  __pyx_r = 0;
26810  __pyx_L0:;
26811  __Pyx_XGIVEREF(__pyx_r);
26812  __Pyx_RefNannyFinishContext();
26813  return __pyx_r;
26814 }
26815 
26816 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
26817  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26818  *
26819  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
26820  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26821  *
26822  */
26823 
26824 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
26825  PyObject *__pyx_r = NULL;
26826  __Pyx_RefNannyDeclarations
26827  PyObject *__pyx_t_1 = NULL;
26828  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
26829 
26830  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
26831  *
26832  * cdef inline object PyArray_MultiIterNew3(a, b, c):
26833  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
26834  *
26835  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
26836  */
26837  __Pyx_XDECREF(__pyx_r);
26838  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 777, __pyx_L1_error)
26839  __Pyx_GOTREF(__pyx_t_1);
26840  __pyx_r = __pyx_t_1;
26841  __pyx_t_1 = 0;
26842  goto __pyx_L0;
26843 
26844  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
26845  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26846  *
26847  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
26848  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26849  *
26850  */
26851 
26852  /* function exit code */
26853  __pyx_L1_error:;
26854  __Pyx_XDECREF(__pyx_t_1);
26855  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
26856  __pyx_r = 0;
26857  __pyx_L0:;
26858  __Pyx_XGIVEREF(__pyx_r);
26859  __Pyx_RefNannyFinishContext();
26860  return __pyx_r;
26861 }
26862 
26863 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
26864  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26865  *
26866  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
26867  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26868  *
26869  */
26870 
26871 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
26872  PyObject *__pyx_r = NULL;
26873  __Pyx_RefNannyDeclarations
26874  PyObject *__pyx_t_1 = NULL;
26875  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
26876 
26877  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780
26878  *
26879  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
26880  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
26881  *
26882  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
26883  */
26884  __Pyx_XDECREF(__pyx_r);
26885  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 780, __pyx_L1_error)
26886  __Pyx_GOTREF(__pyx_t_1);
26887  __pyx_r = __pyx_t_1;
26888  __pyx_t_1 = 0;
26889  goto __pyx_L0;
26890 
26891  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
26892  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26893  *
26894  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
26895  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26896  *
26897  */
26898 
26899  /* function exit code */
26900  __pyx_L1_error:;
26901  __Pyx_XDECREF(__pyx_t_1);
26902  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
26903  __pyx_r = 0;
26904  __pyx_L0:;
26905  __Pyx_XGIVEREF(__pyx_r);
26906  __Pyx_RefNannyFinishContext();
26907  return __pyx_r;
26908 }
26909 
26910 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782
26911  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26912  *
26913  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
26914  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26915  *
26916  */
26917 
26918 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
26919  PyObject *__pyx_r = NULL;
26920  __Pyx_RefNannyDeclarations
26921  PyObject *__pyx_t_1 = NULL;
26922  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
26923 
26924  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
26925  *
26926  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
26927  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
26928  *
26929  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
26930  */
26931  __Pyx_XDECREF(__pyx_r);
26932  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 783, __pyx_L1_error)
26933  __Pyx_GOTREF(__pyx_t_1);
26934  __pyx_r = __pyx_t_1;
26935  __pyx_t_1 = 0;
26936  goto __pyx_L0;
26937 
26938  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782
26939  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26940  *
26941  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
26942  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26943  *
26944  */
26945 
26946  /* function exit code */
26947  __pyx_L1_error:;
26948  __Pyx_XDECREF(__pyx_t_1);
26949  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
26950  __pyx_r = 0;
26951  __pyx_L0:;
26952  __Pyx_XGIVEREF(__pyx_r);
26953  __Pyx_RefNannyFinishContext();
26954  return __pyx_r;
26955 }
26956 
26957 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
26958  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26959  *
26960  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
26961  * # Recursive utility function used in __getbuffer__ to get format
26962  * # string. The new location in the format string is returned.
26963  */
26964 
26965 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
26966  PyArray_Descr *__pyx_v_child = 0;
26967  int __pyx_v_endian_detector;
26968  int __pyx_v_little_endian;
26969  PyObject *__pyx_v_fields = 0;
26970  PyObject *__pyx_v_childname = NULL;
26971  PyObject *__pyx_v_new_offset = NULL;
26972  PyObject *__pyx_v_t = NULL;
26973  char *__pyx_r;
26974  __Pyx_RefNannyDeclarations
26975  PyObject *__pyx_t_1 = NULL;
26976  Py_ssize_t __pyx_t_2;
26977  PyObject *__pyx_t_3 = NULL;
26978  PyObject *__pyx_t_4 = NULL;
26979  int __pyx_t_5;
26980  int __pyx_t_6;
26981  int __pyx_t_7;
26982  long __pyx_t_8;
26983  char *__pyx_t_9;
26984  __Pyx_RefNannySetupContext("_util_dtypestring", 0);
26985 
26986  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
26987  *
26988  * cdef dtype child
26989  * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
26990  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
26991  * cdef tuple fields
26992  */
26993  __pyx_v_endian_detector = 1;
26994 
26995  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
26996  * cdef dtype child
26997  * cdef int endian_detector = 1
26998  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
26999  * cdef tuple fields
27000  *
27001  */
27002  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
27003 
27004  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794
27005  * cdef tuple fields
27006  *
27007  * for childname in descr.names: # <<<<<<<<<<<<<<
27008  * fields = descr.fields[childname]
27009  * child, new_offset = fields
27010  */
27011  if (unlikely(__pyx_v_descr->names == Py_None)) {
27012  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
27013  __PYX_ERR(1, 794, __pyx_L1_error)
27014  }
27015  __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
27016  for (;;) {
27017  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
27018  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27019  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 794, __pyx_L1_error)
27020  #else
27021  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __pyx_L1_error)
27022  __Pyx_GOTREF(__pyx_t_3);
27023  #endif
27024  __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
27025  __pyx_t_3 = 0;
27026 
27027  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":795
27028  *
27029  * for childname in descr.names:
27030  * fields = descr.fields[childname] # <<<<<<<<<<<<<<
27031  * child, new_offset = fields
27032  *
27033  */
27034  if (unlikely(__pyx_v_descr->fields == Py_None)) {
27035  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
27036  __PYX_ERR(1, 795, __pyx_L1_error)
27037  }
27038  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 795, __pyx_L1_error)
27039  __Pyx_GOTREF(__pyx_t_3);
27040  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 795, __pyx_L1_error)
27041  __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
27042  __pyx_t_3 = 0;
27043 
27044  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":796
27045  * for childname in descr.names:
27046  * fields = descr.fields[childname]
27047  * child, new_offset = fields # <<<<<<<<<<<<<<
27048  *
27049  * if (end - f) - <int>(new_offset - offset[0]) < 15:
27050  */
27051  if (likely(__pyx_v_fields != Py_None)) {
27052  PyObject* sequence = __pyx_v_fields;
27053  #if !CYTHON_COMPILING_IN_PYPY
27054  Py_ssize_t size = Py_SIZE(sequence);
27055  #else
27056  Py_ssize_t size = PySequence_Size(sequence);
27057  #endif
27058  if (unlikely(size != 2)) {
27059  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
27060  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
27061  __PYX_ERR(1, 796, __pyx_L1_error)
27062  }
27063  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27064  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
27065  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
27066  __Pyx_INCREF(__pyx_t_3);
27067  __Pyx_INCREF(__pyx_t_4);
27068  #else
27069  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __pyx_L1_error)
27070  __Pyx_GOTREF(__pyx_t_3);
27071  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 796, __pyx_L1_error)
27072  __Pyx_GOTREF(__pyx_t_4);
27073  #endif
27074  } else {
27075  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 796, __pyx_L1_error)
27076  }
27077  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 796, __pyx_L1_error)
27078  __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
27079  __pyx_t_3 = 0;
27080  __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
27081  __pyx_t_4 = 0;
27082 
27083  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798
27084  * child, new_offset = fields
27085  *
27086  * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
27087  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27088  *
27089  */
27090  __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 798, __pyx_L1_error)
27091  __Pyx_GOTREF(__pyx_t_4);
27092  __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 798, __pyx_L1_error)
27093  __Pyx_GOTREF(__pyx_t_3);
27094  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27095  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 798, __pyx_L1_error)
27096  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27097  __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
27098  if (__pyx_t_6) {
27099 
27100  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799
27101  *
27102  * if (end - f) - <int>(new_offset - offset[0]) < 15:
27103  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
27104  *
27105  * if ((child.byteorder == c'>' and little_endian) or
27106  */
27107  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 799, __pyx_L1_error)
27108  __Pyx_GOTREF(__pyx_t_3);
27109  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27110  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27111  __PYX_ERR(1, 799, __pyx_L1_error)
27112 
27113  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798
27114  * child, new_offset = fields
27115  *
27116  * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
27117  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27118  *
27119  */
27120  }
27121 
27122  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
27123  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27124  *
27125  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
27126  * (child.byteorder == c'<' and not little_endian)):
27127  * raise ValueError(u"Non-native byte order not supported")
27128  */
27129  __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
27130  if (!__pyx_t_7) {
27131  goto __pyx_L8_next_or;
27132  } else {
27133  }
27134  __pyx_t_7 = (__pyx_v_little_endian != 0);
27135  if (!__pyx_t_7) {
27136  } else {
27137  __pyx_t_6 = __pyx_t_7;
27138  goto __pyx_L7_bool_binop_done;
27139  }
27140  __pyx_L8_next_or:;
27141 
27142  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
27143  *
27144  * if ((child.byteorder == c'>' and little_endian) or
27145  * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
27146  * raise ValueError(u"Non-native byte order not supported")
27147  * # One could encode it in the format string and have Cython
27148  */
27149  __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
27150  if (__pyx_t_7) {
27151  } else {
27152  __pyx_t_6 = __pyx_t_7;
27153  goto __pyx_L7_bool_binop_done;
27154  }
27155  __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
27156  __pyx_t_6 = __pyx_t_7;
27157  __pyx_L7_bool_binop_done:;
27158 
27159  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
27160  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27161  *
27162  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
27163  * (child.byteorder == c'<' and not little_endian)):
27164  * raise ValueError(u"Non-native byte order not supported")
27165  */
27166  if (__pyx_t_6) {
27167 
27168  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803
27169  * if ((child.byteorder == c'>' and little_endian) or
27170  * (child.byteorder == c'<' and not little_endian)):
27171  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
27172  * # One could encode it in the format string and have Cython
27173  * # complain instead, BUT: < and > in format strings also imply
27174  */
27175  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 803, __pyx_L1_error)
27176  __Pyx_GOTREF(__pyx_t_3);
27177  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27178  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27179  __PYX_ERR(1, 803, __pyx_L1_error)
27180 
27181  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
27182  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27183  *
27184  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
27185  * (child.byteorder == c'<' and not little_endian)):
27186  * raise ValueError(u"Non-native byte order not supported")
27187  */
27188  }
27189 
27190  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
27191  *
27192  * # Output padding bytes
27193  * while offset[0] < new_offset: # <<<<<<<<<<<<<<
27194  * f[0] = 120 # "x"; pad byte
27195  * f += 1
27196  */
27197  while (1) {
27198  __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 813, __pyx_L1_error)
27199  __Pyx_GOTREF(__pyx_t_3);
27200  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 813, __pyx_L1_error)
27201  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27202  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 813, __pyx_L1_error)
27203  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27204  if (!__pyx_t_6) break;
27205 
27206  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":814
27207  * # Output padding bytes
27208  * while offset[0] < new_offset:
27209  * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
27210  * f += 1
27211  * offset[0] += 1
27212  */
27213  (__pyx_v_f[0]) = 0x78;
27214 
27215  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":815
27216  * while offset[0] < new_offset:
27217  * f[0] = 120 # "x"; pad byte
27218  * f += 1 # <<<<<<<<<<<<<<
27219  * offset[0] += 1
27220  *
27221  */
27222  __pyx_v_f = (__pyx_v_f + 1);
27223 
27224  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":816
27225  * f[0] = 120 # "x"; pad byte
27226  * f += 1
27227  * offset[0] += 1 # <<<<<<<<<<<<<<
27228  *
27229  * offset[0] += child.itemsize
27230  */
27231  __pyx_t_8 = 0;
27232  (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
27233  }
27234 
27235  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":818
27236  * offset[0] += 1
27237  *
27238  * offset[0] += child.itemsize # <<<<<<<<<<<<<<
27239  *
27240  * if not PyDataType_HASFIELDS(child):
27241  */
27242  __pyx_t_8 = 0;
27243  (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
27244 
27245  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820
27246  * offset[0] += child.itemsize
27247  *
27248  * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
27249  * t = child.type_num
27250  * if end - f < 5:
27251  */
27252  __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
27253  if (__pyx_t_6) {
27254 
27255  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
27256  *
27257  * if not PyDataType_HASFIELDS(child):
27258  * t = child.type_num # <<<<<<<<<<<<<<
27259  * if end - f < 5:
27260  * raise RuntimeError(u"Format string allocated too short.")
27261  */
27262  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 821, __pyx_L1_error)
27263  __Pyx_GOTREF(__pyx_t_4);
27264  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
27265  __pyx_t_4 = 0;
27266 
27267  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
27268  * if not PyDataType_HASFIELDS(child):
27269  * t = child.type_num
27270  * if end - f < 5: # <<<<<<<<<<<<<<
27271  * raise RuntimeError(u"Format string allocated too short.")
27272  *
27273  */
27274  __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
27275  if (__pyx_t_6) {
27276 
27277  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823
27278  * t = child.type_num
27279  * if end - f < 5:
27280  * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
27281  *
27282  * # Until ticket #99 is fixed, use integers to avoid warnings
27283  */
27284  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 823, __pyx_L1_error)
27285  __Pyx_GOTREF(__pyx_t_4);
27286  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
27287  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27288  __PYX_ERR(1, 823, __pyx_L1_error)
27289 
27290  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
27291  * if not PyDataType_HASFIELDS(child):
27292  * t = child.type_num
27293  * if end - f < 5: # <<<<<<<<<<<<<<
27294  * raise RuntimeError(u"Format string allocated too short.")
27295  *
27296  */
27297  }
27298 
27299  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826
27300  *
27301  * # Until ticket #99 is fixed, use integers to avoid warnings
27302  * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
27303  * elif t == NPY_UBYTE: f[0] = 66 #"B"
27304  * elif t == NPY_SHORT: f[0] = 104 #"h"
27305  */
27306  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 826, __pyx_L1_error)
27307  __Pyx_GOTREF(__pyx_t_4);
27308  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 826, __pyx_L1_error)
27309  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27310  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 826, __pyx_L1_error)
27311  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27312  if (__pyx_t_6) {
27313  (__pyx_v_f[0]) = 98;
27314  goto __pyx_L15;
27315  }
27316 
27317  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
27318  * # Until ticket #99 is fixed, use integers to avoid warnings
27319  * if t == NPY_BYTE: f[0] = 98 #"b"
27320  * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
27321  * elif t == NPY_SHORT: f[0] = 104 #"h"
27322  * elif t == NPY_USHORT: f[0] = 72 #"H"
27323  */
27324  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 827, __pyx_L1_error)
27325  __Pyx_GOTREF(__pyx_t_3);
27326  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 827, __pyx_L1_error)
27327  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27328  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 827, __pyx_L1_error)
27329  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27330  if (__pyx_t_6) {
27331  (__pyx_v_f[0]) = 66;
27332  goto __pyx_L15;
27333  }
27334 
27335  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":828
27336  * if t == NPY_BYTE: f[0] = 98 #"b"
27337  * elif t == NPY_UBYTE: f[0] = 66 #"B"
27338  * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
27339  * elif t == NPY_USHORT: f[0] = 72 #"H"
27340  * elif t == NPY_INT: f[0] = 105 #"i"
27341  */
27342  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 828, __pyx_L1_error)
27343  __Pyx_GOTREF(__pyx_t_4);
27344  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 828, __pyx_L1_error)
27345  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27346  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 828, __pyx_L1_error)
27347  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27348  if (__pyx_t_6) {
27349  (__pyx_v_f[0]) = 0x68;
27350  goto __pyx_L15;
27351  }
27352 
27353  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":829
27354  * elif t == NPY_UBYTE: f[0] = 66 #"B"
27355  * elif t == NPY_SHORT: f[0] = 104 #"h"
27356  * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
27357  * elif t == NPY_INT: f[0] = 105 #"i"
27358  * elif t == NPY_UINT: f[0] = 73 #"I"
27359  */
27360  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 829, __pyx_L1_error)
27361  __Pyx_GOTREF(__pyx_t_3);
27362  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 829, __pyx_L1_error)
27363  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27364  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 829, __pyx_L1_error)
27365  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27366  if (__pyx_t_6) {
27367  (__pyx_v_f[0]) = 72;
27368  goto __pyx_L15;
27369  }
27370 
27371  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
27372  * elif t == NPY_SHORT: f[0] = 104 #"h"
27373  * elif t == NPY_USHORT: f[0] = 72 #"H"
27374  * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
27375  * elif t == NPY_UINT: f[0] = 73 #"I"
27376  * elif t == NPY_LONG: f[0] = 108 #"l"
27377  */
27378  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 830, __pyx_L1_error)
27379  __Pyx_GOTREF(__pyx_t_4);
27380  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 830, __pyx_L1_error)
27381  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27382  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 830, __pyx_L1_error)
27383  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27384  if (__pyx_t_6) {
27385  (__pyx_v_f[0]) = 0x69;
27386  goto __pyx_L15;
27387  }
27388 
27389  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
27390  * elif t == NPY_USHORT: f[0] = 72 #"H"
27391  * elif t == NPY_INT: f[0] = 105 #"i"
27392  * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
27393  * elif t == NPY_LONG: f[0] = 108 #"l"
27394  * elif t == NPY_ULONG: f[0] = 76 #"L"
27395  */
27396  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 831, __pyx_L1_error)
27397  __Pyx_GOTREF(__pyx_t_3);
27398  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 831, __pyx_L1_error)
27399  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27400  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 831, __pyx_L1_error)
27401  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27402  if (__pyx_t_6) {
27403  (__pyx_v_f[0]) = 73;
27404  goto __pyx_L15;
27405  }
27406 
27407  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":832
27408  * elif t == NPY_INT: f[0] = 105 #"i"
27409  * elif t == NPY_UINT: f[0] = 73 #"I"
27410  * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
27411  * elif t == NPY_ULONG: f[0] = 76 #"L"
27412  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
27413  */
27414  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 832, __pyx_L1_error)
27415  __Pyx_GOTREF(__pyx_t_4);
27416  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 832, __pyx_L1_error)
27417  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27418  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 832, __pyx_L1_error)
27419  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27420  if (__pyx_t_6) {
27421  (__pyx_v_f[0]) = 0x6C;
27422  goto __pyx_L15;
27423  }
27424 
27425  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
27426  * elif t == NPY_UINT: f[0] = 73 #"I"
27427  * elif t == NPY_LONG: f[0] = 108 #"l"
27428  * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
27429  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
27430  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
27431  */
27432  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 833, __pyx_L1_error)
27433  __Pyx_GOTREF(__pyx_t_3);
27434  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 833, __pyx_L1_error)
27435  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27436  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 833, __pyx_L1_error)
27437  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27438  if (__pyx_t_6) {
27439  (__pyx_v_f[0]) = 76;
27440  goto __pyx_L15;
27441  }
27442 
27443  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
27444  * elif t == NPY_LONG: f[0] = 108 #"l"
27445  * elif t == NPY_ULONG: f[0] = 76 #"L"
27446  * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
27447  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
27448  * elif t == NPY_FLOAT: f[0] = 102 #"f"
27449  */
27450  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 834, __pyx_L1_error)
27451  __Pyx_GOTREF(__pyx_t_4);
27452  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 834, __pyx_L1_error)
27453  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27454  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 834, __pyx_L1_error)
27455  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27456  if (__pyx_t_6) {
27457  (__pyx_v_f[0]) = 0x71;
27458  goto __pyx_L15;
27459  }
27460 
27461  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":835
27462  * elif t == NPY_ULONG: f[0] = 76 #"L"
27463  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
27464  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
27465  * elif t == NPY_FLOAT: f[0] = 102 #"f"
27466  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
27467  */
27468  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 835, __pyx_L1_error)
27469  __Pyx_GOTREF(__pyx_t_3);
27470  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 835, __pyx_L1_error)
27471  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27472  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 835, __pyx_L1_error)
27473  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27474  if (__pyx_t_6) {
27475  (__pyx_v_f[0]) = 81;
27476  goto __pyx_L15;
27477  }
27478 
27479  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
27480  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
27481  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
27482  * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
27483  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
27484  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
27485  */
27486  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 836, __pyx_L1_error)
27487  __Pyx_GOTREF(__pyx_t_4);
27488  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 836, __pyx_L1_error)
27489  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27490  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 836, __pyx_L1_error)
27491  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27492  if (__pyx_t_6) {
27493  (__pyx_v_f[0]) = 0x66;
27494  goto __pyx_L15;
27495  }
27496 
27497  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
27498  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
27499  * elif t == NPY_FLOAT: f[0] = 102 #"f"
27500  * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
27501  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
27502  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
27503  */
27504  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 837, __pyx_L1_error)
27505  __Pyx_GOTREF(__pyx_t_3);
27506  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 837, __pyx_L1_error)
27507  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27508  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 837, __pyx_L1_error)
27509  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27510  if (__pyx_t_6) {
27511  (__pyx_v_f[0]) = 0x64;
27512  goto __pyx_L15;
27513  }
27514 
27515  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
27516  * elif t == NPY_FLOAT: f[0] = 102 #"f"
27517  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
27518  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
27519  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
27520  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
27521  */
27522  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 838, __pyx_L1_error)
27523  __Pyx_GOTREF(__pyx_t_4);
27524  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 838, __pyx_L1_error)
27525  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27526  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 838, __pyx_L1_error)
27527  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27528  if (__pyx_t_6) {
27529  (__pyx_v_f[0]) = 0x67;
27530  goto __pyx_L15;
27531  }
27532 
27533  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":839
27534  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
27535  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
27536  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
27537  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
27538  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
27539  */
27540  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 839, __pyx_L1_error)
27541  __Pyx_GOTREF(__pyx_t_3);
27542  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 839, __pyx_L1_error)
27543  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27544  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 839, __pyx_L1_error)
27545  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27546  if (__pyx_t_6) {
27547  (__pyx_v_f[0]) = 90;
27548  (__pyx_v_f[1]) = 0x66;
27549  __pyx_v_f = (__pyx_v_f + 1);
27550  goto __pyx_L15;
27551  }
27552 
27553  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
27554  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
27555  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
27556  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
27557  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
27558  * elif t == NPY_OBJECT: f[0] = 79 #"O"
27559  */
27560  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 840, __pyx_L1_error)
27561  __Pyx_GOTREF(__pyx_t_4);
27562  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 840, __pyx_L1_error)
27563  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27564  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 840, __pyx_L1_error)
27565  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27566  if (__pyx_t_6) {
27567  (__pyx_v_f[0]) = 90;
27568  (__pyx_v_f[1]) = 0x64;
27569  __pyx_v_f = (__pyx_v_f + 1);
27570  goto __pyx_L15;
27571  }
27572 
27573  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":841
27574  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
27575  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
27576  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
27577  * elif t == NPY_OBJECT: f[0] = 79 #"O"
27578  * else:
27579  */
27580  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 841, __pyx_L1_error)
27581  __Pyx_GOTREF(__pyx_t_3);
27582  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 841, __pyx_L1_error)
27583  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27584  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 841, __pyx_L1_error)
27585  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27586  if (__pyx_t_6) {
27587  (__pyx_v_f[0]) = 90;
27588  (__pyx_v_f[1]) = 0x67;
27589  __pyx_v_f = (__pyx_v_f + 1);
27590  goto __pyx_L15;
27591  }
27592 
27593  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
27594  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
27595  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
27596  * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
27597  * else:
27598  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
27599  */
27600  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 842, __pyx_L1_error)
27601  __Pyx_GOTREF(__pyx_t_4);
27602  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 842, __pyx_L1_error)
27603  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27604  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 842, __pyx_L1_error)
27605  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27606  if (__pyx_t_6) {
27607  (__pyx_v_f[0]) = 79;
27608  goto __pyx_L15;
27609  }
27610 
27611  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":844
27612  * elif t == NPY_OBJECT: f[0] = 79 #"O"
27613  * else:
27614  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
27615  * f += 1
27616  * else:
27617  */
27618  /*else*/ {
27619  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
27620  __Pyx_GOTREF(__pyx_t_3);
27621  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 844, __pyx_L1_error)
27622  __Pyx_GOTREF(__pyx_t_4);
27623  __Pyx_GIVEREF(__pyx_t_3);
27624  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
27625  __pyx_t_3 = 0;
27626  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
27627  __Pyx_GOTREF(__pyx_t_3);
27628  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27629  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27630  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27631  __PYX_ERR(1, 844, __pyx_L1_error)
27632  }
27633  __pyx_L15:;
27634 
27635  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":845
27636  * else:
27637  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
27638  * f += 1 # <<<<<<<<<<<<<<
27639  * else:
27640  * # Cython ignores struct boundary information ("T{...}"),
27641  */
27642  __pyx_v_f = (__pyx_v_f + 1);
27643 
27644  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820
27645  * offset[0] += child.itemsize
27646  *
27647  * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
27648  * t = child.type_num
27649  * if end - f < 5:
27650  */
27651  goto __pyx_L13;
27652  }
27653 
27654  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":849
27655  * # Cython ignores struct boundary information ("T{...}"),
27656  * # so don't output it
27657  * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
27658  * return f
27659  *
27660  */
27661  /*else*/ {
27662  __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) __PYX_ERR(1, 849, __pyx_L1_error)
27663  __pyx_v_f = __pyx_t_9;
27664  }
27665  __pyx_L13:;
27666 
27667  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794
27668  * cdef tuple fields
27669  *
27670  * for childname in descr.names: # <<<<<<<<<<<<<<
27671  * fields = descr.fields[childname]
27672  * child, new_offset = fields
27673  */
27674  }
27675  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27676 
27677  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":850
27678  * # so don't output it
27679  * f = _util_dtypestring(child, f, end, offset)
27680  * return f # <<<<<<<<<<<<<<
27681  *
27682  *
27683  */
27684  __pyx_r = __pyx_v_f;
27685  goto __pyx_L0;
27686 
27687  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
27688  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
27689  *
27690  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
27691  * # Recursive utility function used in __getbuffer__ to get format
27692  * # string. The new location in the format string is returned.
27693  */
27694 
27695  /* function exit code */
27696  __pyx_L1_error:;
27697  __Pyx_XDECREF(__pyx_t_1);
27698  __Pyx_XDECREF(__pyx_t_3);
27699  __Pyx_XDECREF(__pyx_t_4);
27700  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
27701  __pyx_r = NULL;
27702  __pyx_L0:;
27703  __Pyx_XDECREF((PyObject *)__pyx_v_child);
27704  __Pyx_XDECREF(__pyx_v_fields);
27705  __Pyx_XDECREF(__pyx_v_childname);
27706  __Pyx_XDECREF(__pyx_v_new_offset);
27707  __Pyx_XDECREF(__pyx_v_t);
27708  __Pyx_RefNannyFinishContext();
27709  return __pyx_r;
27710 }
27711 
27712 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966
27713  *
27714  *
27715  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
27716  * cdef PyObject* baseptr
27717  * if base is None:
27718  */
27719 
27720 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
27721  PyObject *__pyx_v_baseptr;
27722  __Pyx_RefNannyDeclarations
27723  int __pyx_t_1;
27724  int __pyx_t_2;
27725  __Pyx_RefNannySetupContext("set_array_base", 0);
27726 
27727  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968
27728  * cdef inline void set_array_base(ndarray arr, object base):
27729  * cdef PyObject* baseptr
27730  * if base is None: # <<<<<<<<<<<<<<
27731  * baseptr = NULL
27732  * else:
27733  */
27734  __pyx_t_1 = (__pyx_v_base == Py_None);
27735  __pyx_t_2 = (__pyx_t_1 != 0);
27736  if (__pyx_t_2) {
27737 
27738  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":969
27739  * cdef PyObject* baseptr
27740  * if base is None:
27741  * baseptr = NULL # <<<<<<<<<<<<<<
27742  * else:
27743  * Py_INCREF(base) # important to do this before decref below!
27744  */
27745  __pyx_v_baseptr = NULL;
27746 
27747  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968
27748  * cdef inline void set_array_base(ndarray arr, object base):
27749  * cdef PyObject* baseptr
27750  * if base is None: # <<<<<<<<<<<<<<
27751  * baseptr = NULL
27752  * else:
27753  */
27754  goto __pyx_L3;
27755  }
27756 
27757  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":971
27758  * baseptr = NULL
27759  * else:
27760  * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<<
27761  * baseptr = <PyObject*>base
27762  * Py_XDECREF(arr.base)
27763  */
27764  /*else*/ {
27765  Py_INCREF(__pyx_v_base);
27766 
27767  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":972
27768  * else:
27769  * Py_INCREF(base) # important to do this before decref below!
27770  * baseptr = <PyObject*>base # <<<<<<<<<<<<<<
27771  * Py_XDECREF(arr.base)
27772  * arr.base = baseptr
27773  */
27774  __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
27775  }
27776  __pyx_L3:;
27777 
27778  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":973
27779  * Py_INCREF(base) # important to do this before decref below!
27780  * baseptr = <PyObject*>base
27781  * Py_XDECREF(arr.base) # <<<<<<<<<<<<<<
27782  * arr.base = baseptr
27783  *
27784  */
27785  Py_XDECREF(__pyx_v_arr->base);
27786 
27787  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":974
27788  * baseptr = <PyObject*>base
27789  * Py_XDECREF(arr.base)
27790  * arr.base = baseptr # <<<<<<<<<<<<<<
27791  *
27792  * cdef inline object get_array_base(ndarray arr):
27793  */
27794  __pyx_v_arr->base = __pyx_v_baseptr;
27795 
27796  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966
27797  *
27798  *
27799  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
27800  * cdef PyObject* baseptr
27801  * if base is None:
27802  */
27803 
27804  /* function exit code */
27805  __Pyx_RefNannyFinishContext();
27806 }
27807 
27808 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976
27809  * arr.base = baseptr
27810  *
27811  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
27812  * if arr.base is NULL:
27813  * return None
27814  */
27815 
27816 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
27817  PyObject *__pyx_r = NULL;
27818  __Pyx_RefNannyDeclarations
27819  int __pyx_t_1;
27820  __Pyx_RefNannySetupContext("get_array_base", 0);
27821 
27822  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
27823  *
27824  * cdef inline object get_array_base(ndarray arr):
27825  * if arr.base is NULL: # <<<<<<<<<<<<<<
27826  * return None
27827  * else:
27828  */
27829  __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
27830  if (__pyx_t_1) {
27831 
27832  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":978
27833  * cdef inline object get_array_base(ndarray arr):
27834  * if arr.base is NULL:
27835  * return None # <<<<<<<<<<<<<<
27836  * else:
27837  * return <object>arr.base
27838  */
27839  __Pyx_XDECREF(__pyx_r);
27840  __Pyx_INCREF(Py_None);
27841  __pyx_r = Py_None;
27842  goto __pyx_L0;
27843 
27844  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
27845  *
27846  * cdef inline object get_array_base(ndarray arr):
27847  * if arr.base is NULL: # <<<<<<<<<<<<<<
27848  * return None
27849  * else:
27850  */
27851  }
27852 
27853  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":980
27854  * return None
27855  * else:
27856  * return <object>arr.base # <<<<<<<<<<<<<<
27857  *
27858  *
27859  */
27860  /*else*/ {
27861  __Pyx_XDECREF(__pyx_r);
27862  __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
27863  __pyx_r = ((PyObject *)__pyx_v_arr->base);
27864  goto __pyx_L0;
27865  }
27866 
27867  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976
27868  * arr.base = baseptr
27869  *
27870  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
27871  * if arr.base is NULL:
27872  * return None
27873  */
27874 
27875  /* function exit code */
27876  __pyx_L0:;
27877  __Pyx_XGIVEREF(__pyx_r);
27878  __Pyx_RefNannyFinishContext();
27879  return __pyx_r;
27880 }
27881 
27882 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":985
27883  * # Versions of the import_* functions which are more suitable for
27884  * # Cython code.
27885  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
27886  * try:
27887  * _import_array()
27888  */
27889 
27890 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
27891  int __pyx_r;
27892  __Pyx_RefNannyDeclarations
27893  PyObject *__pyx_t_1 = NULL;
27894  PyObject *__pyx_t_2 = NULL;
27895  PyObject *__pyx_t_3 = NULL;
27896  int __pyx_t_4;
27897  PyObject *__pyx_t_5 = NULL;
27898  PyObject *__pyx_t_6 = NULL;
27899  PyObject *__pyx_t_7 = NULL;
27900  PyObject *__pyx_t_8 = NULL;
27901  __Pyx_RefNannySetupContext("import_array", 0);
27902 
27903  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":986
27904  * # Cython code.
27905  * cdef inline int import_array() except -1:
27906  * try: # <<<<<<<<<<<<<<
27907  * _import_array()
27908  * except Exception:
27909  */
27910  {
27911  __Pyx_PyThreadState_declare
27912  __Pyx_PyThreadState_assign
27913  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
27914  __Pyx_XGOTREF(__pyx_t_1);
27915  __Pyx_XGOTREF(__pyx_t_2);
27916  __Pyx_XGOTREF(__pyx_t_3);
27917  /*try:*/ {
27918 
27919  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":987
27920  * cdef inline int import_array() except -1:
27921  * try:
27922  * _import_array() # <<<<<<<<<<<<<<
27923  * except Exception:
27924  * raise ImportError("numpy.core.multiarray failed to import")
27925  */
27926  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 987, __pyx_L3_error)
27927 
27928  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":986
27929  * # Cython code.
27930  * cdef inline int import_array() except -1:
27931  * try: # <<<<<<<<<<<<<<
27932  * _import_array()
27933  * except Exception:
27934  */
27935  }
27936  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27937  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27938  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
27939  goto __pyx_L10_try_end;
27940  __pyx_L3_error:;
27941  __Pyx_PyThreadState_assign
27942 
27943  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":988
27944  * try:
27945  * _import_array()
27946  * except Exception: # <<<<<<<<<<<<<<
27947  * raise ImportError("numpy.core.multiarray failed to import")
27948  *
27949  */
27950  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
27951  if (__pyx_t_4) {
27952  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
27953  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 988, __pyx_L5_except_error)
27954  __Pyx_GOTREF(__pyx_t_5);
27955  __Pyx_GOTREF(__pyx_t_6);
27956  __Pyx_GOTREF(__pyx_t_7);
27957 
27958  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":989
27959  * _import_array()
27960  * except Exception:
27961  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
27962  *
27963  * cdef inline int import_umath() except -1:
27964  */
27965  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 989, __pyx_L5_except_error)
27966  __Pyx_GOTREF(__pyx_t_8);
27967  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
27968  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27969  __PYX_ERR(1, 989, __pyx_L5_except_error)
27970  }
27971  goto __pyx_L5_except_error;
27972  __pyx_L5_except_error:;
27973 
27974  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":986
27975  * # Cython code.
27976  * cdef inline int import_array() except -1:
27977  * try: # <<<<<<<<<<<<<<
27978  * _import_array()
27979  * except Exception:
27980  */
27981  __Pyx_PyThreadState_assign
27982  __Pyx_XGIVEREF(__pyx_t_1);
27983  __Pyx_XGIVEREF(__pyx_t_2);
27984  __Pyx_XGIVEREF(__pyx_t_3);
27985  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27986  goto __pyx_L1_error;
27987  __pyx_L10_try_end:;
27988  }
27989 
27990  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":985
27991  * # Versions of the import_* functions which are more suitable for
27992  * # Cython code.
27993  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
27994  * try:
27995  * _import_array()
27996  */
27997 
27998  /* function exit code */
27999  __pyx_r = 0;
28000  goto __pyx_L0;
28001  __pyx_L1_error:;
28002  __Pyx_XDECREF(__pyx_t_5);
28003  __Pyx_XDECREF(__pyx_t_6);
28004  __Pyx_XDECREF(__pyx_t_7);
28005  __Pyx_XDECREF(__pyx_t_8);
28006  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
28007  __pyx_r = -1;
28008  __pyx_L0:;
28009  __Pyx_RefNannyFinishContext();
28010  return __pyx_r;
28011 }
28012 
28013 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":991
28014  * raise ImportError("numpy.core.multiarray failed to import")
28015  *
28016  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
28017  * try:
28018  * _import_umath()
28019  */
28020 
28021 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
28022  int __pyx_r;
28023  __Pyx_RefNannyDeclarations
28024  PyObject *__pyx_t_1 = NULL;
28025  PyObject *__pyx_t_2 = NULL;
28026  PyObject *__pyx_t_3 = NULL;
28027  int __pyx_t_4;
28028  PyObject *__pyx_t_5 = NULL;
28029  PyObject *__pyx_t_6 = NULL;
28030  PyObject *__pyx_t_7 = NULL;
28031  PyObject *__pyx_t_8 = NULL;
28032  __Pyx_RefNannySetupContext("import_umath", 0);
28033 
28034  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":992
28035  *
28036  * cdef inline int import_umath() except -1:
28037  * try: # <<<<<<<<<<<<<<
28038  * _import_umath()
28039  * except Exception:
28040  */
28041  {
28042  __Pyx_PyThreadState_declare
28043  __Pyx_PyThreadState_assign
28044  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
28045  __Pyx_XGOTREF(__pyx_t_1);
28046  __Pyx_XGOTREF(__pyx_t_2);
28047  __Pyx_XGOTREF(__pyx_t_3);
28048  /*try:*/ {
28049 
28050  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":993
28051  * cdef inline int import_umath() except -1:
28052  * try:
28053  * _import_umath() # <<<<<<<<<<<<<<
28054  * except Exception:
28055  * raise ImportError("numpy.core.umath failed to import")
28056  */
28057  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 993, __pyx_L3_error)
28058 
28059  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":992
28060  *
28061  * cdef inline int import_umath() except -1:
28062  * try: # <<<<<<<<<<<<<<
28063  * _import_umath()
28064  * except Exception:
28065  */
28066  }
28067  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
28068  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28069  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
28070  goto __pyx_L10_try_end;
28071  __pyx_L3_error:;
28072  __Pyx_PyThreadState_assign
28073 
28074  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":994
28075  * try:
28076  * _import_umath()
28077  * except Exception: # <<<<<<<<<<<<<<
28078  * raise ImportError("numpy.core.umath failed to import")
28079  *
28080  */
28081  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
28082  if (__pyx_t_4) {
28083  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
28084  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 994, __pyx_L5_except_error)
28085  __Pyx_GOTREF(__pyx_t_5);
28086  __Pyx_GOTREF(__pyx_t_6);
28087  __Pyx_GOTREF(__pyx_t_7);
28088 
28089  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":995
28090  * _import_umath()
28091  * except Exception:
28092  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
28093  *
28094  * cdef inline int import_ufunc() except -1:
28095  */
28096  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 995, __pyx_L5_except_error)
28097  __Pyx_GOTREF(__pyx_t_8);
28098  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
28099  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
28100  __PYX_ERR(1, 995, __pyx_L5_except_error)
28101  }
28102  goto __pyx_L5_except_error;
28103  __pyx_L5_except_error:;
28104 
28105  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":992
28106  *
28107  * cdef inline int import_umath() except -1:
28108  * try: # <<<<<<<<<<<<<<
28109  * _import_umath()
28110  * except Exception:
28111  */
28112  __Pyx_PyThreadState_assign
28113  __Pyx_XGIVEREF(__pyx_t_1);
28114  __Pyx_XGIVEREF(__pyx_t_2);
28115  __Pyx_XGIVEREF(__pyx_t_3);
28116  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
28117  goto __pyx_L1_error;
28118  __pyx_L10_try_end:;
28119  }
28120 
28121  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":991
28122  * raise ImportError("numpy.core.multiarray failed to import")
28123  *
28124  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
28125  * try:
28126  * _import_umath()
28127  */
28128 
28129  /* function exit code */
28130  __pyx_r = 0;
28131  goto __pyx_L0;
28132  __pyx_L1_error:;
28133  __Pyx_XDECREF(__pyx_t_5);
28134  __Pyx_XDECREF(__pyx_t_6);
28135  __Pyx_XDECREF(__pyx_t_7);
28136  __Pyx_XDECREF(__pyx_t_8);
28137  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
28138  __pyx_r = -1;
28139  __pyx_L0:;
28140  __Pyx_RefNannyFinishContext();
28141  return __pyx_r;
28142 }
28143 
28144 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
28145  * raise ImportError("numpy.core.umath failed to import")
28146  *
28147  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
28148  * try:
28149  * _import_umath()
28150  */
28151 
28152 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
28153  int __pyx_r;
28154  __Pyx_RefNannyDeclarations
28155  PyObject *__pyx_t_1 = NULL;
28156  PyObject *__pyx_t_2 = NULL;
28157  PyObject *__pyx_t_3 = NULL;
28158  int __pyx_t_4;
28159  PyObject *__pyx_t_5 = NULL;
28160  PyObject *__pyx_t_6 = NULL;
28161  PyObject *__pyx_t_7 = NULL;
28162  PyObject *__pyx_t_8 = NULL;
28163  __Pyx_RefNannySetupContext("import_ufunc", 0);
28164 
28165  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
28166  *
28167  * cdef inline int import_ufunc() except -1:
28168  * try: # <<<<<<<<<<<<<<
28169  * _import_umath()
28170  * except Exception:
28171  */
28172  {
28173  __Pyx_PyThreadState_declare
28174  __Pyx_PyThreadState_assign
28175  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
28176  __Pyx_XGOTREF(__pyx_t_1);
28177  __Pyx_XGOTREF(__pyx_t_2);
28178  __Pyx_XGOTREF(__pyx_t_3);
28179  /*try:*/ {
28180 
28181  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":999
28182  * cdef inline int import_ufunc() except -1:
28183  * try:
28184  * _import_umath() # <<<<<<<<<<<<<<
28185  * except Exception:
28186  * raise ImportError("numpy.core.umath failed to import")
28187  */
28188  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 999, __pyx_L3_error)
28189 
28190  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
28191  *
28192  * cdef inline int import_ufunc() except -1:
28193  * try: # <<<<<<<<<<<<<<
28194  * _import_umath()
28195  * except Exception:
28196  */
28197  }
28198  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
28199  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28200  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
28201  goto __pyx_L10_try_end;
28202  __pyx_L3_error:;
28203  __Pyx_PyThreadState_assign
28204 
28205  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1000
28206  * try:
28207  * _import_umath()
28208  * except Exception: # <<<<<<<<<<<<<<
28209  * raise ImportError("numpy.core.umath failed to import")
28210  */
28211  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
28212  if (__pyx_t_4) {
28213  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
28214  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1000, __pyx_L5_except_error)
28215  __Pyx_GOTREF(__pyx_t_5);
28216  __Pyx_GOTREF(__pyx_t_6);
28217  __Pyx_GOTREF(__pyx_t_7);
28218 
28219  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1001
28220  * _import_umath()
28221  * except Exception:
28222  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
28223  */
28224  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1001, __pyx_L5_except_error)
28225  __Pyx_GOTREF(__pyx_t_8);
28226  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
28227  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
28228  __PYX_ERR(1, 1001, __pyx_L5_except_error)
28229  }
28230  goto __pyx_L5_except_error;
28231  __pyx_L5_except_error:;
28232 
28233  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
28234  *
28235  * cdef inline int import_ufunc() except -1:
28236  * try: # <<<<<<<<<<<<<<
28237  * _import_umath()
28238  * except Exception:
28239  */
28240  __Pyx_PyThreadState_assign
28241  __Pyx_XGIVEREF(__pyx_t_1);
28242  __Pyx_XGIVEREF(__pyx_t_2);
28243  __Pyx_XGIVEREF(__pyx_t_3);
28244  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
28245  goto __pyx_L1_error;
28246  __pyx_L10_try_end:;
28247  }
28248 
28249  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
28250  * raise ImportError("numpy.core.umath failed to import")
28251  *
28252  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
28253  * try:
28254  * _import_umath()
28255  */
28256 
28257  /* function exit code */
28258  __pyx_r = 0;
28259  goto __pyx_L0;
28260  __pyx_L1_error:;
28261  __Pyx_XDECREF(__pyx_t_5);
28262  __Pyx_XDECREF(__pyx_t_6);
28263  __Pyx_XDECREF(__pyx_t_7);
28264  __Pyx_XDECREF(__pyx_t_8);
28265  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
28266  __pyx_r = -1;
28267  __pyx_L0:;
28268  __Pyx_RefNannyFinishContext();
28269  return __pyx_r;
28270 }
28271 
28272 static PyObject *__pyx_tp_new_3ADR_ADR(PyTypeObject *t, PyObject *a, PyObject *k) {
28273  PyObject *o;
28274  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
28275  o = (*t->tp_alloc)(t, 0);
28276  } else {
28277  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
28278  }
28279  if (unlikely(!o)) return 0;
28280  if (unlikely(__pyx_pw_3ADR_3ADR_1__cinit__(o, a, k) < 0)) goto bad;
28281  return o;
28282  bad:
28283  Py_DECREF(o); o = 0;
28284  return NULL;
28285 }
28286 
28287 static void __pyx_tp_dealloc_3ADR_ADR(PyObject *o) {
28288  #if PY_VERSION_HEX >= 0x030400a1
28289  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
28290  if (PyObject_CallFinalizerFromDealloc(o)) return;
28291  }
28292  #endif
28293  {
28294  PyObject *etype, *eval, *etb;
28295  PyErr_Fetch(&etype, &eval, &etb);
28296  ++Py_REFCNT(o);
28297  __pyx_pw_3ADR_3ADR_3__dealloc__(o);
28298  --Py_REFCNT(o);
28299  PyErr_Restore(etype, eval, etb);
28300  }
28301  (*Py_TYPE(o)->tp_free)(o);
28302 }
28303 
28304 static PyMethodDef __pyx_methods_3ADR_ADR[] = {
28305  {"calculateResidual", (PyCFunction)__pyx_pw_3ADR_3ADR_5calculateResidual, METH_VARARGS|METH_KEYWORDS, 0},
28306  {"calculateJacobian", (PyCFunction)__pyx_pw_3ADR_3ADR_7calculateJacobian, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ADR_3ADR_6calculateJacobian},
28307  {0, 0, 0, 0}
28308 };
28309 
28310 static PyTypeObject __pyx_type_3ADR_ADR = {
28311  PyVarObject_HEAD_INIT(0, 0)
28312  "ADR.ADR", /*tp_name*/
28313  sizeof(struct __pyx_obj_3ADR_ADR), /*tp_basicsize*/
28314  0, /*tp_itemsize*/
28315  __pyx_tp_dealloc_3ADR_ADR, /*tp_dealloc*/
28316  0, /*tp_print*/
28317  0, /*tp_getattr*/
28318  0, /*tp_setattr*/
28319  #if PY_MAJOR_VERSION < 3
28320  0, /*tp_compare*/
28321  #endif
28322  #if PY_MAJOR_VERSION >= 3
28323  0, /*tp_as_async*/
28324  #endif
28325  0, /*tp_repr*/
28326  0, /*tp_as_number*/
28327  0, /*tp_as_sequence*/
28328  0, /*tp_as_mapping*/
28329  0, /*tp_hash*/
28330  0, /*tp_call*/
28331  0, /*tp_str*/
28332  0, /*tp_getattro*/
28333  0, /*tp_setattro*/
28334  0, /*tp_as_buffer*/
28335  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
28336  "\n Optimized ADR member functions\n ", /*tp_doc*/
28337  0, /*tp_traverse*/
28338  0, /*tp_clear*/
28339  0, /*tp_richcompare*/
28340  0, /*tp_weaklistoffset*/
28341  0, /*tp_iter*/
28342  0, /*tp_iternext*/
28343  __pyx_methods_3ADR_ADR, /*tp_methods*/
28344  0, /*tp_members*/
28345  0, /*tp_getset*/
28346  0, /*tp_base*/
28347  0, /*tp_dict*/
28348  0, /*tp_descr_get*/
28349  0, /*tp_descr_set*/
28350  0, /*tp_dictoffset*/
28351  0, /*tp_init*/
28352  0, /*tp_alloc*/
28353  __pyx_tp_new_3ADR_ADR, /*tp_new*/
28354  0, /*tp_free*/
28355  0, /*tp_is_gc*/
28356  0, /*tp_bases*/
28357  0, /*tp_mro*/
28358  0, /*tp_cache*/
28359  0, /*tp_subclasses*/
28360  0, /*tp_weaklist*/
28361  0, /*tp_del*/
28362  0, /*tp_version_tag*/
28363  #if PY_VERSION_HEX >= 0x030400a1
28364  0, /*tp_finalize*/
28365  #endif
28366 };
28367 
28368 static PyMethodDef __pyx_methods[] = {
28369  {0, 0, 0, 0}
28370 };
28371 
28372 #if PY_MAJOR_VERSION >= 3
28373 static struct PyModuleDef __pyx_moduledef = {
28374  #if PY_VERSION_HEX < 0x03020000
28375  { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
28376  #else
28377  PyModuleDef_HEAD_INIT,
28378  #endif
28379  "ADR",
28380  __pyx_k_An_optimized_Advection_Diffusio, /* m_doc */
28381  -1, /* m_size */
28382  __pyx_methods /* m_methods */,
28383  NULL, /* m_reload */
28384  NULL, /* m_traverse */
28385  NULL, /* m_clear */
28386  NULL /* m_free */
28387 };
28388 #endif
28389 
28390 static __Pyx_StringTabEntry __pyx_string_tab[] = {
28391  {&__pyx_n_s_ADR, __pyx_k_ADR, sizeof(__pyx_k_ADR), 0, 0, 1, 1},
28392  {&__pyx_kp_s_ADR_ShockCapturing_lagging_reque, __pyx_k_ADR_ShockCapturing_lagging_reque, sizeof(__pyx_k_ADR_ShockCapturing_lagging_reque), 0, 0, 1, 0},
28393  {&__pyx_kp_s_ADR_ShockCapturing_switched_to_l, __pyx_k_ADR_ShockCapturing_switched_to_l, sizeof(__pyx_k_ADR_ShockCapturing_switched_to_l), 0, 0, 1, 0},
28394  {&__pyx_n_s_Advection_DiagonalUpwind_Diffusi, __pyx_k_Advection_DiagonalUpwind_Diffusi, sizeof(__pyx_k_Advection_DiagonalUpwind_Diffusi), 0, 0, 1, 1},
28395  {&__pyx_n_s_Advection_DiagonalUpwind_Diffusi_2, __pyx_k_Advection_DiagonalUpwind_Diffusi_2, sizeof(__pyx_k_Advection_DiagonalUpwind_Diffusi_2), 0, 0, 1, 1},
28396  {&__pyx_n_s_Advection_DiagonalUpwind_Diffusi_3, __pyx_k_Advection_DiagonalUpwind_Diffusi_3, sizeof(__pyx_k_Advection_DiagonalUpwind_Diffusi_3), 0, 0, 1, 1},
28397  {&__pyx_n_s_Archiver, __pyx_k_Archiver, sizeof(__pyx_k_Archiver), 0, 0, 1, 1},
28398  {&__pyx_kp_s_Building_time_integration_object, __pyx_k_Building_time_integration_object, sizeof(__pyx_k_Building_time_integration_object), 0, 0, 1, 0},
28399  {&__pyx_n_s_C0_AffineLinearOnSimplexWithNoda, __pyx_k_C0_AffineLinearOnSimplexWithNoda, sizeof(__pyx_k_C0_AffineLinearOnSimplexWithNoda), 0, 0, 1, 1},
28400  {&__pyx_n_s_CT_sge, __pyx_k_CT_sge, sizeof(__pyx_k_CT_sge), 0, 0, 1, 1},
28401  {&__pyx_kp_s_Calculating_numerical_quadrature, __pyx_k_Calculating_numerical_quadrature, sizeof(__pyx_k_Calculating_numerical_quadrature), 0, 0, 1, 0},
28402  {&__pyx_n_s_Coefficients, __pyx_k_Coefficients, sizeof(__pyx_k_Coefficients), 0, 0, 1, 1},
28403  {&__pyx_n_s_Coefficients___init, __pyx_k_Coefficients___init, sizeof(__pyx_k_Coefficients___init), 0, 0, 1, 1},
28404  {&__pyx_n_s_Coefficients_evaluate, __pyx_k_Coefficients_evaluate, sizeof(__pyx_k_Coefficients_evaluate), 0, 0, 1, 1},
28405  {&__pyx_n_s_Coefficients_initializeElementBo, __pyx_k_Coefficients_initializeElementBo, sizeof(__pyx_k_Coefficients_initializeElementBo), 0, 0, 1, 1},
28406  {&__pyx_n_s_Coefficients_initializeElementQu, __pyx_k_Coefficients_initializeElementQu, sizeof(__pyx_k_Coefficients_initializeElementQu), 0, 0, 1, 1},
28407  {&__pyx_n_s_Coefficients_initializeGlobalExt, __pyx_k_Coefficients_initializeGlobalExt, sizeof(__pyx_k_Coefficients_initializeGlobalExt), 0, 0, 1, 1},
28408  {&__pyx_kp_s_Coefficients_of_linear_ADR_equa, __pyx_k_Coefficients_of_linear_ADR_equa, sizeof(__pyx_k_Coefficients_of_linear_ADR_equa), 0, 0, 1, 0},
28409  {&__pyx_n_s_Comm, __pyx_k_Comm, sizeof(__pyx_k_Comm), 0, 0, 1, 1},
28410  {&__pyx_n_s_CompKernelFlag, __pyx_k_CompKernelFlag, sizeof(__pyx_k_CompKernelFlag), 0, 0, 1, 1},
28411  {&__pyx_n_s_DOFBoundaryConditions, __pyx_k_DOFBoundaryConditions, sizeof(__pyx_k_DOFBoundaryConditions), 0, 0, 1, 1},
28412  {&__pyx_n_s_FluxBoundaryConditions, __pyx_k_FluxBoundaryConditions, sizeof(__pyx_k_FluxBoundaryConditions), 0, 0, 1, 1},
28413  {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
28414  {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
28415  {&__pyx_kp_s_Global_residual, __pyx_k_Global_residual, sizeof(__pyx_k_Global_residual), 0, 0, 1, 0},
28416  {&__pyx_n_s_Hess, __pyx_k_Hess, sizeof(__pyx_k_Hess), 0, 0, 1, 1},
28417  {&__pyx_n_s_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 0, 1, 1},
28418  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
28419  {&__pyx_kp_s_Jacobian, __pyx_k_Jacobian, sizeof(__pyx_k_Jacobian), 0, 0, 1, 0},
28420  {&__pyx_n_s_L2projectEvaluate, __pyx_k_L2projectEvaluate, sizeof(__pyx_k_L2projectEvaluate), 0, 0, 1, 1},
28421  {&__pyx_n_s_LevelModel, __pyx_k_LevelModel, sizeof(__pyx_k_LevelModel), 0, 0, 1, 1},
28422  {&__pyx_n_s_LevelModel___init, __pyx_k_LevelModel___init, sizeof(__pyx_k_LevelModel___init), 0, 0, 1, 1},
28423  {&__pyx_n_s_LevelModel_calculateAuxiliaryQua, __pyx_k_LevelModel_calculateAuxiliaryQua, sizeof(__pyx_k_LevelModel_calculateAuxiliaryQua), 0, 0, 1, 1},
28424  {&__pyx_n_s_LevelModel_calculateCoefficients, __pyx_k_LevelModel_calculateCoefficients, sizeof(__pyx_k_LevelModel_calculateCoefficients), 0, 0, 1, 1},
28425  {&__pyx_n_s_LevelModel_calculateElementBound, __pyx_k_LevelModel_calculateElementBound, sizeof(__pyx_k_LevelModel_calculateElementBound), 0, 0, 1, 1},
28426  {&__pyx_n_s_LevelModel_calculateElementQuadr, __pyx_k_LevelModel_calculateElementQuadr, sizeof(__pyx_k_LevelModel_calculateElementQuadr), 0, 0, 1, 1},
28427  {&__pyx_n_s_LevelModel_calculateExteriorElem, __pyx_k_LevelModel_calculateExteriorElem, sizeof(__pyx_k_LevelModel_calculateExteriorElem), 0, 0, 1, 1},
28428  {&__pyx_n_s_LevelModel_calculateSolutionAtQu, __pyx_k_LevelModel_calculateSolutionAtQu, sizeof(__pyx_k_LevelModel_calculateSolutionAtQu), 0, 0, 1, 1},
28429  {&__pyx_n_s_LevelModel_estimate_mt, __pyx_k_LevelModel_estimate_mt, sizeof(__pyx_k_LevelModel_estimate_mt), 0, 0, 1, 1},
28430  {&__pyx_n_s_LevelModel_getJacobian, __pyx_k_LevelModel_getJacobian, sizeof(__pyx_k_LevelModel_getJacobian), 0, 0, 1, 1},
28431  {&__pyx_n_s_LevelModel_getResidual, __pyx_k_LevelModel_getResidual, sizeof(__pyx_k_LevelModel_getResidual), 0, 0, 1, 1},
28432  {&__pyx_n_s_MOVING_DOMAIN, __pyx_k_MOVING_DOMAIN, sizeof(__pyx_k_MOVING_DOMAIN), 0, 0, 1, 1},
28433  {&__pyx_kp_s_Mass_Conservation_Error, __pyx_k_Mass_Conservation_Error, sizeof(__pyx_k_Mass_Conservation_Error), 0, 0, 1, 0},
28434  {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
28435  {&__pyx_n_s_NonlinearEquation, __pyx_k_NonlinearEquation, sizeof(__pyx_k_NonlinearEquation), 0, 0, 1, 1},
28436  {&__pyx_n_s_NumericalFlux, __pyx_k_NumericalFlux, sizeof(__pyx_k_NumericalFlux), 0, 0, 1, 1},
28437  {&__pyx_n_s_NumericalFlux_IIPG, __pyx_k_NumericalFlux_IIPG, sizeof(__pyx_k_NumericalFlux_IIPG), 0, 0, 1, 1},
28438  {&__pyx_n_s_NumericalFlux_IIPG___init, __pyx_k_NumericalFlux_IIPG___init, sizeof(__pyx_k_NumericalFlux_IIPG___init), 0, 0, 1, 1},
28439  {&__pyx_n_s_NumericalFlux_NIPG, __pyx_k_NumericalFlux_NIPG, sizeof(__pyx_k_NumericalFlux_NIPG), 0, 0, 1, 1},
28440  {&__pyx_n_s_NumericalFlux_NIPG___init, __pyx_k_NumericalFlux_NIPG___init, sizeof(__pyx_k_NumericalFlux_NIPG___init), 0, 0, 1, 1},
28441  {&__pyx_n_s_NumericalFlux_SIPG, __pyx_k_NumericalFlux_SIPG, sizeof(__pyx_k_NumericalFlux_SIPG), 0, 0, 1, 1},
28442  {&__pyx_n_s_NumericalFlux_SIPG___init, __pyx_k_NumericalFlux_SIPG___init, sizeof(__pyx_k_NumericalFlux_SIPG___init), 0, 0, 1, 1},
28443  {&__pyx_n_s_OneLevelTransport, __pyx_k_OneLevelTransport, sizeof(__pyx_k_OneLevelTransport), 0, 0, 1, 1},
28444  {&__pyx_kp_s_Optimized_LevelModel_for_ADR_eq, __pyx_k_Optimized_LevelModel_for_ADR_eq, sizeof(__pyx_k_Optimized_LevelModel_for_ADR_eq), 0, 0, 1, 0},
28445  {&__pyx_n_s_PostProcessingTools, __pyx_k_PostProcessingTools, sizeof(__pyx_k_PostProcessingTools), 0, 0, 1, 1},
28446  {&__pyx_n_s_Quadrature, __pyx_k_Quadrature, sizeof(__pyx_k_Quadrature), 0, 0, 1, 1},
28447  {&__pyx_kp_s_Residual_based_shock_capturing, __pyx_k_Residual_based_shock_capturing, sizeof(__pyx_k_Residual_based_shock_capturing), 0, 0, 1, 0},
28448  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
28449  {&__pyx_n_s_SGE_base, __pyx_k_SGE_base, sizeof(__pyx_k_SGE_base), 0, 0, 1, 1},
28450  {&__pyx_n_s_ShockCapturing, __pyx_k_ShockCapturing, sizeof(__pyx_k_ShockCapturing), 0, 0, 1, 1},
28451  {&__pyx_n_s_ShockCapturing___init, __pyx_k_ShockCapturing___init, sizeof(__pyx_k_ShockCapturing___init), 0, 0, 1, 1},
28452  {&__pyx_n_s_ShockCapturing_base, __pyx_k_ShockCapturing_base, sizeof(__pyx_k_ShockCapturing_base), 0, 0, 1, 1},
28453  {&__pyx_n_s_ShockCapturing_initializeElement, __pyx_k_ShockCapturing_initializeElement, sizeof(__pyx_k_ShockCapturing_initializeElement), 0, 0, 1, 1},
28454  {&__pyx_n_s_ShockCapturing_updateShockCaptur, __pyx_k_ShockCapturing_updateShockCaptur, sizeof(__pyx_k_ShockCapturing_updateShockCaptur), 0, 0, 1, 1},
28455  {&__pyx_n_s_SimplexLobattoQuadrature, __pyx_k_SimplexLobattoQuadrature, sizeof(__pyx_k_SimplexLobattoQuadrature), 0, 0, 1, 1},
28456  {&__pyx_n_s_SubgridError, __pyx_k_SubgridError, sizeof(__pyx_k_SubgridError), 0, 0, 1, 1},
28457  {&__pyx_n_s_SubgridError___init, __pyx_k_SubgridError___init, sizeof(__pyx_k_SubgridError___init), 0, 0, 1, 1},
28458  {&__pyx_kp_s_SubgridError_approximation_for, __pyx_k_SubgridError_approximation_for, sizeof(__pyx_k_SubgridError_approximation_for), 0, 0, 1, 0},
28459  {&__pyx_n_s_SubgridError_calculateSubgridErr, __pyx_k_SubgridError_calculateSubgridErr, sizeof(__pyx_k_SubgridError_calculateSubgridErr), 0, 0, 1, 1},
28460  {&__pyx_n_s_SubgridError_initializeElementQu, __pyx_k_SubgridError_initializeElementQu, sizeof(__pyx_k_SubgridError_initializeElementQu), 0, 0, 1, 1},
28461  {&__pyx_n_s_SubgridError_updateSubgridErrorH, __pyx_k_SubgridError_updateSubgridErrorH, sizeof(__pyx_k_SubgridError_updateSubgridErrorH), 0, 0, 1, 1},
28462  {&__pyx_n_s_TC_base, __pyx_k_TC_base, sizeof(__pyx_k_TC_base), 0, 0, 1, 1},
28463  {&__pyx_n_s_TimeIntegration, __pyx_k_TimeIntegration, sizeof(__pyx_k_TimeIntegration), 0, 0, 1, 1},
28464  {&__pyx_n_s_TimeIntegrationClass, __pyx_k_TimeIntegrationClass, sizeof(__pyx_k_TimeIntegrationClass), 0, 0, 1, 1},
28465  {&__pyx_n_s_Transport, __pyx_k_Transport, sizeof(__pyx_k_Transport), 0, 0, 1, 1},
28466  {&__pyx_kp_s_Updating_local_to_global_mapping, __pyx_k_Updating_local_to_global_mapping, sizeof(__pyx_k_Updating_local_to_global_mapping), 0, 0, 1, 0},
28467  {&__pyx_kp_s_VOF_max_numDiff_e, __pyx_k_VOF_max_numDiff_e, sizeof(__pyx_k_VOF_max_numDiff_e), 0, 0, 1, 0},
28468  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
28469  {&__pyx_n_s_VelocityPostProcessingChooser, __pyx_k_VelocityPostProcessingChooser, sizeof(__pyx_k_VelocityPostProcessingChooser), 0, 0, 1, 1},
28470  {&__pyx_n_s_XdmfWriter, __pyx_k_XdmfWriter, sizeof(__pyx_k_XdmfWriter), 0, 0, 1, 1},
28471  {&__pyx_kp_s_You_must_use_a_numerical_flux_to, __pyx_k_You_must_use_a_numerical_flux_to, sizeof(__pyx_k_You_must_use_a_numerical_flux_to), 0, 0, 1, 0},
28472  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
28473  {&__pyx_n_s_aOfX, __pyx_k_aOfX, sizeof(__pyx_k_aOfX), 0, 0, 1, 1},
28474  {&__pyx_n_s_adjoint_sigma, __pyx_k_adjoint_sigma, sizeof(__pyx_k_adjoint_sigma), 0, 0, 1, 1},
28475  {&__pyx_n_s_adr, __pyx_k_adr, sizeof(__pyx_k_adr), 0, 0, 1, 1},
28476  {&__pyx_n_s_advection, __pyx_k_advection, sizeof(__pyx_k_advection), 0, 0, 1, 1},
28477  {&__pyx_n_s_advectiveFluxBoundaryConditionsD, __pyx_k_advectiveFluxBoundaryConditionsD, sizeof(__pyx_k_advectiveFluxBoundaryConditionsD), 0, 0, 1, 1},
28478  {&__pyx_n_s_advectiveFluxBoundaryConditionsS, __pyx_k_advectiveFluxBoundaryConditionsS, sizeof(__pyx_k_advectiveFluxBoundaryConditionsS), 0, 0, 1, 1},
28479  {&__pyx_n_s_advectiveFlux_bc, __pyx_k_advectiveFlux_bc, sizeof(__pyx_k_advectiveFlux_bc), 0, 0, 1, 1},
28480  {&__pyx_n_s_advectiveFlux_bc_flag, __pyx_k_advectiveFlux_bc_flag, sizeof(__pyx_k_advectiveFlux_bc_flag), 0, 0, 1, 1},
28481  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
28482  {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1},
28483  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
28484  {&__pyx_n_s_boundaryAdjoint_sigma, __pyx_k_boundaryAdjoint_sigma, sizeof(__pyx_k_boundaryAdjoint_sigma), 0, 0, 1, 1},
28485  {&__pyx_n_s_boundaryJac_ref, __pyx_k_boundaryJac_ref, sizeof(__pyx_k_boundaryJac_ref), 0, 0, 1, 1},
28486  {&__pyx_n_s_boundaryJacobians, __pyx_k_boundaryJacobians, sizeof(__pyx_k_boundaryJacobians), 0, 0, 1, 1},
28487  {&__pyx_n_s_boundaryNormals, __pyx_k_boundaryNormals, sizeof(__pyx_k_boundaryNormals), 0, 0, 1, 1},
28488  {&__pyx_n_s_buildUnion, __pyx_k_buildUnion, sizeof(__pyx_k_buildUnion), 0, 0, 1, 1},
28489  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
28490  {&__pyx_n_s_calculateAuxiliaryQuantitiesAfte, __pyx_k_calculateAuxiliaryQuantitiesAfte, sizeof(__pyx_k_calculateAuxiliaryQuantitiesAfte), 0, 0, 1, 1},
28491  {&__pyx_n_s_calculateCoefficients, __pyx_k_calculateCoefficients, sizeof(__pyx_k_calculateCoefficients), 0, 0, 1, 1},
28492  {&__pyx_n_s_calculateElementBoundaryQuadratu, __pyx_k_calculateElementBoundaryQuadratu, sizeof(__pyx_k_calculateElementBoundaryQuadratu), 0, 0, 1, 1},
28493  {&__pyx_n_s_calculateElementQuadrature, __pyx_k_calculateElementQuadrature, sizeof(__pyx_k_calculateElementQuadrature), 0, 0, 1, 1},
28494  {&__pyx_n_s_calculateExteriorElementBoundary, __pyx_k_calculateExteriorElementBoundary, sizeof(__pyx_k_calculateExteriorElementBoundary), 0, 0, 1, 1},
28495  {&__pyx_n_s_calculateJacobian, __pyx_k_calculateJacobian, sizeof(__pyx_k_calculateJacobian), 0, 0, 1, 1},
28496  {&__pyx_n_s_calculateQuadrature, __pyx_k_calculateQuadrature, sizeof(__pyx_k_calculateQuadrature), 0, 0, 1, 1},
28497  {&__pyx_n_s_calculateResidual, __pyx_k_calculateResidual, sizeof(__pyx_k_calculateResidual), 0, 0, 1, 1},
28498  {&__pyx_n_s_calculateSolutionAtQuadrature, __pyx_k_calculateSolutionAtQuadrature, sizeof(__pyx_k_calculateSolutionAtQuadrature), 0, 0, 1, 1},
28499  {&__pyx_n_s_calculateSubgridError, __pyx_k_calculateSubgridError, sizeof(__pyx_k_calculateSubgridError), 0, 0, 1, 1},
28500  {&__pyx_n_s_cebq, __pyx_k_cebq, sizeof(__pyx_k_cebq), 0, 0, 1, 1},
28501  {&__pyx_n_s_cebq_global, __pyx_k_cebq_global, sizeof(__pyx_k_cebq_global), 0, 0, 1, 1},
28502  {&__pyx_n_s_cebqe, __pyx_k_cebqe, sizeof(__pyx_k_cebqe), 0, 0, 1, 1},
28503  {&__pyx_n_s_cfemIntegrals, __pyx_k_cfemIntegrals, sizeof(__pyx_k_cfemIntegrals), 0, 0, 1, 1},
28504  {&__pyx_n_s_cfl, __pyx_k_cfl, sizeof(__pyx_k_cfl), 0, 0, 1, 1},
28505  {&__pyx_n_s_ci, __pyx_k_ci, sizeof(__pyx_k_ci), 0, 0, 1, 1},
28506  {&__pyx_n_s_cj, __pyx_k_cj, sizeof(__pyx_k_cj), 0, 0, 1, 1},
28507  {&__pyx_n_s_ck, __pyx_k_ck, sizeof(__pyx_k_ck), 0, 0, 1, 1},
28508  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
28509  {&__pyx_n_s_coefficients, __pyx_k_coefficients, sizeof(__pyx_k_coefficients), 0, 0, 1, 1},
28510  {&__pyx_n_s_comm, __pyx_k_comm, sizeof(__pyx_k_comm), 0, 0, 1, 1},
28511  {&__pyx_n_s_compKernelFlag, __pyx_k_compKernelFlag, sizeof(__pyx_k_compKernelFlag), 0, 0, 1, 1},
28512  {&__pyx_n_s_components, __pyx_k_components, sizeof(__pyx_k_components), 0, 0, 1, 1},
28513  {&__pyx_n_s_conservativeFlux, __pyx_k_conservativeFlux, sizeof(__pyx_k_conservativeFlux), 0, 0, 1, 1},
28514  {&__pyx_n_s_conservativeFluxDict, __pyx_k_conservativeFluxDict, sizeof(__pyx_k_conservativeFluxDict), 0, 0, 1, 1},
28515  {&__pyx_n_s_constant, __pyx_k_constant, sizeof(__pyx_k_constant), 0, 0, 1, 1},
28516  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
28517  {&__pyx_n_s_cq, __pyx_k_cq, sizeof(__pyx_k_cq), 0, 0, 1, 1},
28518  {&__pyx_n_s_csrColumnOffsets, __pyx_k_csrColumnOffsets, sizeof(__pyx_k_csrColumnOffsets), 0, 0, 1, 1},
28519  {&__pyx_n_s_csrColumnOffsets_eb, __pyx_k_csrColumnOffsets_eb, sizeof(__pyx_k_csrColumnOffsets_eb), 0, 0, 1, 1},
28520  {&__pyx_n_s_csrColumnOffsets_eb_u_u, __pyx_k_csrColumnOffsets_eb_u_u, sizeof(__pyx_k_csrColumnOffsets_eb_u_u), 0, 0, 1, 1},
28521  {&__pyx_n_s_csrColumnOffsets_u_u, __pyx_k_csrColumnOffsets_u_u, sizeof(__pyx_k_csrColumnOffsets_u_u), 0, 0, 1, 1},
28522  {&__pyx_n_s_csrRowIndeces, __pyx_k_csrRowIndeces, sizeof(__pyx_k_csrRowIndeces), 0, 0, 1, 1},
28523  {&__pyx_n_s_csrRowIndeces_u_u, __pyx_k_csrRowIndeces_u_u, sizeof(__pyx_k_csrRowIndeces_u_u), 0, 0, 1, 1},
28524  {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
28525  {&__pyx_n_s_dS_ref, __pyx_k_dS_ref, sizeof(__pyx_k_dS_ref), 0, 0, 1, 1},
28526  {&__pyx_n_s_dV_ref, __pyx_k_dV_ref, sizeof(__pyx_k_dV_ref), 0, 0, 1, 1},
28527  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
28528  {&__pyx_n_s_dc, __pyx_k_dc, sizeof(__pyx_k_dc), 0, 0, 1, 1},
28529  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
28530  {&__pyx_n_s_defaultName, __pyx_k_defaultName, sizeof(__pyx_k_defaultName), 0, 0, 1, 1},
28531  {&__pyx_n_s_df, __pyx_k_df, sizeof(__pyx_k_df), 0, 0, 1, 1},
28532  {&__pyx_n_s_diffusion, __pyx_k_diffusion, sizeof(__pyx_k_diffusion), 0, 0, 1, 1},
28533  {&__pyx_n_s_diffusionDict, __pyx_k_diffusionDict, sizeof(__pyx_k_diffusionDict), 0, 0, 1, 1},
28534  {&__pyx_n_s_diffusiveFluxBoundaryConditionsD, __pyx_k_diffusiveFluxBoundaryConditionsD, sizeof(__pyx_k_diffusiveFluxBoundaryConditionsD), 0, 0, 1, 1},
28535  {&__pyx_n_s_diffusiveFluxBoundaryConditionsD_2, __pyx_k_diffusiveFluxBoundaryConditionsD_2, sizeof(__pyx_k_diffusiveFluxBoundaryConditionsD_2), 0, 0, 1, 1},
28536  {&__pyx_n_s_diffusiveFluxBoundaryConditionsS, __pyx_k_diffusiveFluxBoundaryConditionsS, sizeof(__pyx_k_diffusiveFluxBoundaryConditionsS), 0, 0, 1, 1},
28537  {&__pyx_n_s_diffusiveFlux_bc, __pyx_k_diffusiveFlux_bc, sizeof(__pyx_k_diffusiveFlux_bc), 0, 0, 1, 1},
28538  {&__pyx_n_s_diffusiveFlux_bc_flag, __pyx_k_diffusiveFlux_bc_flag, sizeof(__pyx_k_diffusiveFlux_bc_flag), 0, 0, 1, 1},
28539  {&__pyx_n_s_dim, __pyx_k_dim, sizeof(__pyx_k_dim), 0, 0, 1, 1},
28540  {&__pyx_n_s_dirichletConditions, __pyx_k_dirichletConditions, sizeof(__pyx_k_dirichletConditions), 0, 0, 1, 1},
28541  {&__pyx_n_s_dirichletConditionsForceDOF, __pyx_k_dirichletConditionsForceDOF, sizeof(__pyx_k_dirichletConditionsForceDOF), 0, 0, 1, 1},
28542  {&__pyx_n_s_dirichletNodeSetList, __pyx_k_dirichletNodeSetList, sizeof(__pyx_k_dirichletNodeSetList), 0, 0, 1, 1},
28543  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
28544  {&__pyx_n_s_dof, __pyx_k_dof, sizeof(__pyx_k_dof), 0, 0, 1, 1},
28545  {&__pyx_n_s_dofBoundaryConditionsDict, __pyx_k_dofBoundaryConditionsDict, sizeof(__pyx_k_dofBoundaryConditionsDict), 0, 0, 1, 1},
28546  {&__pyx_n_s_dofBoundaryConditionsSetterDict, __pyx_k_dofBoundaryConditionsSetterDict, sizeof(__pyx_k_dofBoundaryConditionsSetterDict), 0, 0, 1, 1},
28547  {&__pyx_n_s_dofMap, __pyx_k_dofMap, sizeof(__pyx_k_dofMap), 0, 0, 1, 1},
28548  {&__pyx_n_s_dphi, __pyx_k_dphi, sizeof(__pyx_k_dphi), 0, 0, 1, 1},
28549  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
28550  {&__pyx_n_s_eN_global, __pyx_k_eN_global, sizeof(__pyx_k_eN_global), 0, 0, 1, 1},
28551  {&__pyx_n_s_ebN, __pyx_k_ebN, sizeof(__pyx_k_ebN), 0, 0, 1, 1},
28552  {&__pyx_n_s_ebNE, __pyx_k_ebNE, sizeof(__pyx_k_ebNE), 0, 0, 1, 1},
28553  {&__pyx_n_s_ebN_element, __pyx_k_ebN_element, sizeof(__pyx_k_ebN_element), 0, 0, 1, 1},
28554  {&__pyx_n_s_ebq, __pyx_k_ebq, sizeof(__pyx_k_ebq), 0, 0, 1, 1},
28555  {&__pyx_n_s_ebq_global, __pyx_k_ebq_global, sizeof(__pyx_k_ebq_global), 0, 0, 1, 1},
28556  {&__pyx_n_s_ebqe, __pyx_k_ebqe, sizeof(__pyx_k_ebqe), 0, 0, 1, 1},
28557  {&__pyx_n_s_ebqe_a, __pyx_k_ebqe_a, sizeof(__pyx_k_ebqe_a), 0, 0, 1, 1},
28558  {&__pyx_n_s_ebqe_bc_advectiveFlux_u_ext, __pyx_k_ebqe_bc_advectiveFlux_u_ext, sizeof(__pyx_k_ebqe_bc_advectiveFlux_u_ext), 0, 0, 1, 1},
28559  {&__pyx_n_s_ebqe_bc_flux_u_ext, __pyx_k_ebqe_bc_flux_u_ext, sizeof(__pyx_k_ebqe_bc_flux_u_ext), 0, 0, 1, 1},
28560  {&__pyx_n_s_ebqe_bc_u_ext, __pyx_k_ebqe_bc_u_ext, sizeof(__pyx_k_ebqe_bc_u_ext), 0, 0, 1, 1},
28561  {&__pyx_n_s_ebqe_penalty, __pyx_k_ebqe_penalty, sizeof(__pyx_k_ebqe_penalty), 0, 0, 1, 1},
28562  {&__pyx_n_s_ebqe_v, __pyx_k_ebqe_v, sizeof(__pyx_k_ebqe_v), 0, 0, 1, 1},
28563  {&__pyx_n_s_elemQuadIsDict, __pyx_k_elemQuadIsDict, sizeof(__pyx_k_elemQuadIsDict), 0, 0, 1, 1},
28564  {&__pyx_n_s_elementBoundaryDiametersArray, __pyx_k_elementBoundaryDiametersArray, sizeof(__pyx_k_elementBoundaryDiametersArray), 0, 0, 1, 1},
28565  {&__pyx_n_s_elementBoundaryElementsArray, __pyx_k_elementBoundaryElementsArray, sizeof(__pyx_k_elementBoundaryElementsArray), 0, 0, 1, 1},
28566  {&__pyx_n_s_elementBoundaryIntegralKeys, __pyx_k_elementBoundaryIntegralKeys, sizeof(__pyx_k_elementBoundaryIntegralKeys), 0, 0, 1, 1},
28567  {&__pyx_n_s_elementBoundaryIntegrals, __pyx_k_elementBoundaryIntegrals, sizeof(__pyx_k_elementBoundaryIntegrals), 0, 0, 1, 1},
28568  {&__pyx_n_s_elementBoundaryLocalElementBound, __pyx_k_elementBoundaryLocalElementBound, sizeof(__pyx_k_elementBoundaryLocalElementBound), 0, 0, 1, 1},
28569  {&__pyx_n_s_elementBoundaryQuadrature, __pyx_k_elementBoundaryQuadrature, sizeof(__pyx_k_elementBoundaryQuadrature), 0, 0, 1, 1},
28570  {&__pyx_n_s_elementBoundaryQuadratureDict, __pyx_k_elementBoundaryQuadratureDict, sizeof(__pyx_k_elementBoundaryQuadratureDict), 0, 0, 1, 1},
28571  {&__pyx_n_s_elementBoundaryQuadratureDiction, __pyx_k_elementBoundaryQuadratureDiction, sizeof(__pyx_k_elementBoundaryQuadratureDiction), 0, 0, 1, 1},
28572  {&__pyx_n_s_elementBoundaryQuadraturePoints, __pyx_k_elementBoundaryQuadraturePoints, sizeof(__pyx_k_elementBoundaryQuadraturePoints), 0, 0, 1, 1},
28573  {&__pyx_n_s_elementBoundaryQuadratureRuleInd, __pyx_k_elementBoundaryQuadratureRuleInd, sizeof(__pyx_k_elementBoundaryQuadratureRuleInd), 0, 0, 1, 1},
28574  {&__pyx_n_s_elementBoundaryQuadratureWeights, __pyx_k_elementBoundaryQuadratureWeights, sizeof(__pyx_k_elementBoundaryQuadratureWeights), 0, 0, 1, 1},
28575  {&__pyx_n_s_elementDiameter, __pyx_k_elementDiameter, sizeof(__pyx_k_elementDiameter), 0, 0, 1, 1},
28576  {&__pyx_n_s_elementDiametersArray, __pyx_k_elementDiametersArray, sizeof(__pyx_k_elementDiametersArray), 0, 0, 1, 1},
28577  {&__pyx_n_s_elementEffectiveDiametersArray, __pyx_k_elementEffectiveDiametersArray, sizeof(__pyx_k_elementEffectiveDiametersArray), 0, 0, 1, 1},
28578  {&__pyx_n_s_elementInnerDiametersArray, __pyx_k_elementInnerDiametersArray, sizeof(__pyx_k_elementInnerDiametersArray), 0, 0, 1, 1},
28579  {&__pyx_n_s_elementIntegralKeys, __pyx_k_elementIntegralKeys, sizeof(__pyx_k_elementIntegralKeys), 0, 0, 1, 1},
28580  {&__pyx_n_s_elementMaps, __pyx_k_elementMaps, sizeof(__pyx_k_elementMaps), 0, 0, 1, 1},
28581  {&__pyx_n_s_elementNodesArray, __pyx_k_elementNodesArray, sizeof(__pyx_k_elementNodesArray), 0, 0, 1, 1},
28582  {&__pyx_n_s_elementQuadrature, __pyx_k_elementQuadrature, sizeof(__pyx_k_elementQuadrature), 0, 0, 1, 1},
28583  {&__pyx_n_s_elementQuadratureDict, __pyx_k_elementQuadratureDict, sizeof(__pyx_k_elementQuadratureDict), 0, 0, 1, 1},
28584  {&__pyx_n_s_elementQuadratureDictionaryWrite, __pyx_k_elementQuadratureDictionaryWrite, sizeof(__pyx_k_elementQuadratureDictionaryWrite), 0, 0, 1, 1},
28585  {&__pyx_n_s_elementQuadraturePoints, __pyx_k_elementQuadraturePoints, sizeof(__pyx_k_elementQuadraturePoints), 0, 0, 1, 1},
28586  {&__pyx_n_s_elementQuadratureRuleIndeces, __pyx_k_elementQuadratureRuleIndeces, sizeof(__pyx_k_elementQuadratureRuleIndeces), 0, 0, 1, 1},
28587  {&__pyx_n_s_elementQuadratureWeights, __pyx_k_elementQuadratureWeights, sizeof(__pyx_k_elementQuadratureWeights), 0, 0, 1, 1},
28588  {&__pyx_kp_s_element_and_element_boundary_Jac, __pyx_k_element_and_element_boundary_Jac, sizeof(__pyx_k_element_and_element_boundary_Jac), 0, 0, 1, 0},
28589  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
28590  {&__pyx_n_s_estimate_mt, __pyx_k_estimate_mt, sizeof(__pyx_k_estimate_mt), 0, 0, 1, 1},
28591  {&__pyx_n_s_evaluate, __pyx_k_evaluate, sizeof(__pyx_k_evaluate), 0, 0, 1, 1},
28592  {&__pyx_n_s_exteriorElementBoundariesArray, __pyx_k_exteriorElementBoundariesArray, sizeof(__pyx_k_exteriorElementBoundariesArray), 0, 0, 1, 1},
28593  {&__pyx_n_s_exteriorElementBoundaryQuadratur, __pyx_k_exteriorElementBoundaryQuadratur, sizeof(__pyx_k_exteriorElementBoundaryQuadratur), 0, 0, 1, 1},
28594  {&__pyx_n_s_fOfX, __pyx_k_fOfX, sizeof(__pyx_k_fOfX), 0, 0, 1, 1},
28595  {&__pyx_n_s_fabs, __pyx_k_fabs, sizeof(__pyx_k_fabs), 0, 0, 1, 1},
28596  {&__pyx_n_s_fbcObject, __pyx_k_fbcObject, sizeof(__pyx_k_fbcObject), 0, 0, 1, 1},
28597  {&__pyx_n_s_femSpace, __pyx_k_femSpace, sizeof(__pyx_k_femSpace), 0, 0, 1, 1},
28598  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
28599  {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1},
28600  {&__pyx_n_s_flat, __pyx_k_flat, sizeof(__pyx_k_flat), 0, 0, 1, 1},
28601  {&__pyx_n_s_fluxBoundaryConditions, __pyx_k_fluxBoundaryConditions, sizeof(__pyx_k_fluxBoundaryConditions), 0, 0, 1, 1},
28602  {&__pyx_n_s_fluxBoundaryConditionsDict, __pyx_k_fluxBoundaryConditionsDict, sizeof(__pyx_k_fluxBoundaryConditionsDict), 0, 0, 1, 1},
28603  {&__pyx_n_s_fluxBoundaryConditionsObjectsDic, __pyx_k_fluxBoundaryConditionsObjectsDic, sizeof(__pyx_k_fluxBoundaryConditionsObjectsDic), 0, 0, 1, 1},
28604  {&__pyx_n_s_forceStrongConditions, __pyx_k_forceStrongConditions, sizeof(__pyx_k_forceStrongConditions), 0, 0, 1, 1},
28605  {&__pyx_n_s_forceStrongDirichlet, __pyx_k_forceStrongDirichlet, sizeof(__pyx_k_forceStrongDirichlet), 0, 0, 1, 1},
28606  {&__pyx_n_s_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 0, 1, 1},
28607  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
28608  {&__pyx_n_s_getAdvectiveFluxBoundaryConditio, __pyx_k_getAdvectiveFluxBoundaryConditio, sizeof(__pyx_k_getAdvectiveFluxBoundaryConditio), 0, 0, 1, 1},
28609  {&__pyx_n_s_getBasisGradientValuesRef, __pyx_k_getBasisGradientValuesRef, sizeof(__pyx_k_getBasisGradientValuesRef), 0, 0, 1, 1},
28610  {&__pyx_n_s_getBasisGradientValuesTraceRef, __pyx_k_getBasisGradientValuesTraceRef, sizeof(__pyx_k_getBasisGradientValuesTraceRef), 0, 0, 1, 1},
28611  {&__pyx_n_s_getBasisValuesRef, __pyx_k_getBasisValuesRef, sizeof(__pyx_k_getBasisValuesRef), 0, 0, 1, 1},
28612  {&__pyx_n_s_getBasisValuesTraceRef, __pyx_k_getBasisValuesTraceRef, sizeof(__pyx_k_getBasisValuesTraceRef), 0, 0, 1, 1},
28613  {&__pyx_n_s_getCSRrepresentation, __pyx_k_getCSRrepresentation, sizeof(__pyx_k_getCSRrepresentation), 0, 0, 1, 1},
28614  {&__pyx_n_s_getDiffusiveFluxBoundaryConditio, __pyx_k_getDiffusiveFluxBoundaryConditio, sizeof(__pyx_k_getDiffusiveFluxBoundaryConditio), 0, 0, 1, 1},
28615  {&__pyx_n_s_getJacobian, __pyx_k_getJacobian, sizeof(__pyx_k_getJacobian), 0, 0, 1, 1},
28616  {&__pyx_n_s_getPointwiseBoundaryConditions, __pyx_k_getPointwiseBoundaryConditions, sizeof(__pyx_k_getPointwiseBoundaryConditions), 0, 0, 1, 1},
28617  {&__pyx_n_s_getResidual, __pyx_k_getResidual, sizeof(__pyx_k_getResidual), 0, 0, 1, 1},
28618  {&__pyx_n_s_getValues, __pyx_k_getValues, sizeof(__pyx_k_getValues), 0, 0, 1, 1},
28619  {&__pyx_n_s_getValuesGlobalExteriorTrace, __pyx_k_getValuesGlobalExteriorTrace, sizeof(__pyx_k_getValuesGlobalExteriorTrace), 0, 0, 1, 1},
28620  {&__pyx_n_s_globalJacobian, __pyx_k_globalJacobian, sizeof(__pyx_k_globalJacobian), 0, 0, 1, 1},
28621  {&__pyx_n_s_globalMax, __pyx_k_globalMax, sizeof(__pyx_k_globalMax), 0, 0, 1, 1},
28622  {&__pyx_n_s_globalResidual, __pyx_k_globalResidual, sizeof(__pyx_k_globalResidual), 0, 0, 1, 1},
28623  {&__pyx_n_s_globalSum, __pyx_k_globalSum, sizeof(__pyx_k_globalSum), 0, 0, 1, 1},
28624  {&__pyx_n_s_grad_psi, __pyx_k_grad_psi, sizeof(__pyx_k_grad_psi), 0, 0, 1, 1},
28625  {&__pyx_n_s_grad_psi_trace, __pyx_k_grad_psi_trace, sizeof(__pyx_k_grad_psi_trace), 0, 0, 1, 1},
28626  {&__pyx_kp_s_grad_u, __pyx_k_grad_u, sizeof(__pyx_k_grad_u), 0, 0, 1, 0},
28627  {&__pyx_n_s_hamiltonian, __pyx_k_hamiltonian, sizeof(__pyx_k_hamiltonian), 0, 0, 1, 1},
28628  {&__pyx_n_s_has_key, __pyx_k_has_key, sizeof(__pyx_k_has_key), 0, 0, 1, 1},
28629  {&__pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_k_home_cekees_proteus_proteus_ADR, sizeof(__pyx_k_home_cekees_proteus_proteus_ADR), 0, 0, 1, 0},
28630  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
28631  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
28632  {&__pyx_kp_s_inflowBC_internalNodes_updateLoc, __pyx_k_inflowBC_internalNodes_updateLoc, sizeof(__pyx_k_inflowBC_internalNodes_updateLoc), 0, 0, 1, 0},
28633  {&__pyx_n_s_inflowBoundaryBC, __pyx_k_inflowBoundaryBC, sizeof(__pyx_k_inflowBoundaryBC), 0, 0, 1, 1},
28634  {&__pyx_n_s_inflowBoundaryBC_values, __pyx_k_inflowBoundaryBC_values, sizeof(__pyx_k_inflowBoundaryBC_values), 0, 0, 1, 1},
28635  {&__pyx_n_s_inflowFlux, __pyx_k_inflowFlux, sizeof(__pyx_k_inflowFlux), 0, 0, 1, 1},
28636  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
28637  {&__pyx_n_s_initializationPhase, __pyx_k_initializationPhase, sizeof(__pyx_k_initializationPhase), 0, 0, 1, 1},
28638  {&__pyx_n_s_initializeElementBoundaryQuadrat, __pyx_k_initializeElementBoundaryQuadrat, sizeof(__pyx_k_initializeElementBoundaryQuadrat), 0, 0, 1, 1},
28639  {&__pyx_n_s_initializeElementQuadrature, __pyx_k_initializeElementQuadrature, sizeof(__pyx_k_initializeElementQuadrature), 0, 0, 1, 1},
28640  {&__pyx_n_s_initializeGlobalExteriorElementB, __pyx_k_initializeGlobalExteriorElementB, sizeof(__pyx_k_initializeGlobalExteriorElementB), 0, 0, 1, 1},
28641  {&__pyx_n_s_initializeMesh, __pyx_k_initializeMesh, sizeof(__pyx_k_initializeMesh), 0, 0, 1, 1},
28642  {&__pyx_n_s_initializeTimeIntegration, __pyx_k_initializeTimeIntegration, sizeof(__pyx_k_initializeTimeIntegration), 0, 0, 1, 1},
28643  {&__pyx_n_s_integrateInterpolationPoints, __pyx_k_integrateInterpolationPoints, sizeof(__pyx_k_integrateInterpolationPoints), 0, 0, 1, 1},
28644  {&__pyx_n_s_internalNodes, __pyx_k_internalNodes, sizeof(__pyx_k_internalNodes), 0, 0, 1, 1},
28645  {&__pyx_n_s_internalNodesArray, __pyx_k_internalNodesArray, sizeof(__pyx_k_internalNodesArray), 0, 0, 1, 1},
28646  {&__pyx_n_s_interpolationConditions, __pyx_k_interpolationConditions, sizeof(__pyx_k_interpolationConditions), 0, 0, 1, 1},
28647  {&__pyx_n_s_isAdvectiveFluxBoundary_u, __pyx_k_isAdvectiveFluxBoundary_u, sizeof(__pyx_k_isAdvectiveFluxBoundary_u), 0, 0, 1, 1},
28648  {&__pyx_n_s_isDOFBoundary, __pyx_k_isDOFBoundary, sizeof(__pyx_k_isDOFBoundary), 0, 0, 1, 1},
28649  {&__pyx_n_s_isDOFBoundary_u, __pyx_k_isDOFBoundary_u, sizeof(__pyx_k_isDOFBoundary_u), 0, 0, 1, 1},
28650  {&__pyx_n_s_isFluxBoundary_u, __pyx_k_isFluxBoundary_u, sizeof(__pyx_k_isFluxBoundary_u), 0, 0, 1, 1},
28651  {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
28652  {&__pyx_n_s_jacobian, __pyx_k_jacobian, sizeof(__pyx_k_jacobian), 0, 0, 1, 1},
28653  {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
28654  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
28655  {&__pyx_n_s_l2g, __pyx_k_l2g, sizeof(__pyx_k_l2g), 0, 0, 1, 1},
28656  {&__pyx_n_s_l2proj, __pyx_k_l2proj, sizeof(__pyx_k_l2proj), 0, 0, 1, 1},
28657  {&__pyx_n_s_lag, __pyx_k_lag, sizeof(__pyx_k_lag), 0, 0, 1, 1},
28658  {&__pyx_n_s_lag_shockCapturing, __pyx_k_lag_shockCapturing, sizeof(__pyx_k_lag_shockCapturing), 0, 0, 1, 1},
28659  {&__pyx_n_s_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 0, 1, 1},
28660  {&__pyx_n_s_linear, __pyx_k_linear, sizeof(__pyx_k_linear), 0, 0, 1, 1},
28661  {&__pyx_n_s_localFunctionSpace, __pyx_k_localFunctionSpace, sizeof(__pyx_k_localFunctionSpace), 0, 0, 1, 1},
28662  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
28663  {&__pyx_n_s_logEvent, __pyx_k_logEvent, sizeof(__pyx_k_logEvent), 0, 0, 1, 1},
28664  {&__pyx_n_s_lowmem, __pyx_k_lowmem, sizeof(__pyx_k_lowmem), 0, 0, 1, 1},
28665  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
28666  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
28667  {&__pyx_n_s_mass, __pyx_k_mass, sizeof(__pyx_k_mass), 0, 0, 1, 1},
28668  {&__pyx_n_s_massConservationError, __pyx_k_massConservationError, sizeof(__pyx_k_massConservationError), 0, 0, 1, 1},
28669  {&__pyx_n_s_massLumping, __pyx_k_massLumping, sizeof(__pyx_k_massLumping), 0, 0, 1, 1},
28670  {&__pyx_n_s_matType, __pyx_k_matType, sizeof(__pyx_k_matType), 0, 0, 1, 1},
28671  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
28672  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
28673  {&__pyx_n_s_max_nDOF_element, __pyx_k_max_nDOF_element, sizeof(__pyx_k_max_nDOF_element), 0, 0, 1, 1},
28674  {&__pyx_n_s_memory, __pyx_k_memory, sizeof(__pyx_k_memory), 0, 0, 1, 1},
28675  {&__pyx_n_s_mesh, __pyx_k_mesh, sizeof(__pyx_k_mesh), 0, 0, 1, 1},
28676  {&__pyx_n_s_mesh_dof, __pyx_k_mesh_dof, sizeof(__pyx_k_mesh_dof), 0, 0, 1, 1},
28677  {&__pyx_n_s_mesh_grad_trial_ref, __pyx_k_mesh_grad_trial_ref, sizeof(__pyx_k_mesh_grad_trial_ref), 0, 0, 1, 1},
28678  {&__pyx_n_s_mesh_grad_trial_trace_ref, __pyx_k_mesh_grad_trial_trace_ref, sizeof(__pyx_k_mesh_grad_trial_trace_ref), 0, 0, 1, 1},
28679  {&__pyx_n_s_mesh_l2g, __pyx_k_mesh_l2g, sizeof(__pyx_k_mesh_l2g), 0, 0, 1, 1},
28680  {&__pyx_n_s_mesh_trial_ref, __pyx_k_mesh_trial_ref, sizeof(__pyx_k_mesh_trial_ref), 0, 0, 1, 1},
28681  {&__pyx_n_s_mesh_trial_trace_ref, __pyx_k_mesh_trial_trace_ref, sizeof(__pyx_k_mesh_trial_trace_ref), 0, 0, 1, 1},
28682  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
28683  {&__pyx_n_s_mixedFlow, __pyx_k_mixedFlow, sizeof(__pyx_k_mixedFlow), 0, 0, 1, 1},
28684  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
28685  {&__pyx_n_s_movingDomain, __pyx_k_movingDomain, sizeof(__pyx_k_movingDomain), 0, 0, 1, 1},
28686  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
28687  {&__pyx_n_s_nCalls, __pyx_k_nCalls, sizeof(__pyx_k_nCalls), 0, 0, 1, 1},
28688  {&__pyx_n_s_nDOF_mesh_trial_elementIn, __pyx_k_nDOF_mesh_trial_elementIn, sizeof(__pyx_k_nDOF_mesh_trial_elementIn), 0, 0, 1, 1},
28689  {&__pyx_n_s_nDOF_phi_trial_element, __pyx_k_nDOF_phi_trial_element, sizeof(__pyx_k_nDOF_phi_trial_element), 0, 0, 1, 1},
28690  {&__pyx_n_s_nDOF_test_element, __pyx_k_nDOF_test_element, sizeof(__pyx_k_nDOF_test_element), 0, 0, 1, 1},
28691  {&__pyx_n_s_nDOF_test_elementIn, __pyx_k_nDOF_test_elementIn, sizeof(__pyx_k_nDOF_test_elementIn), 0, 0, 1, 1},
28692  {&__pyx_n_s_nDOF_trial_element, __pyx_k_nDOF_trial_element, sizeof(__pyx_k_nDOF_trial_element), 0, 0, 1, 1},
28693  {&__pyx_n_s_nDOF_trial_elementIn, __pyx_k_nDOF_trial_elementIn, sizeof(__pyx_k_nDOF_trial_elementIn), 0, 0, 1, 1},
28694  {&__pyx_n_s_nElementBoundaries_element, __pyx_k_nElementBoundaries_element, sizeof(__pyx_k_nElementBoundaries_element), 0, 0, 1, 1},
28695  {&__pyx_n_s_nElementBoundaries_global, __pyx_k_nElementBoundaries_global, sizeof(__pyx_k_nElementBoundaries_global), 0, 0, 1, 1},
28696  {&__pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_k_nElementBoundaryQuadraturePoints, sizeof(__pyx_k_nElementBoundaryQuadraturePoints), 0, 0, 1, 1},
28697  {&__pyx_n_s_nElementBoundaryQuadraturePoints_2, __pyx_k_nElementBoundaryQuadraturePoints_2, sizeof(__pyx_k_nElementBoundaryQuadraturePoints_2), 0, 0, 1, 1},
28698  {&__pyx_n_s_nElements_global, __pyx_k_nElements_global, sizeof(__pyx_k_nElements_global), 0, 0, 1, 1},
28699  {&__pyx_n_s_nElements_owned, __pyx_k_nElements_owned, sizeof(__pyx_k_nElements_owned), 0, 0, 1, 1},
28700  {&__pyx_n_s_nExteriorElementBoundaries_globa, __pyx_k_nExteriorElementBoundaries_globa, sizeof(__pyx_k_nExteriorElementBoundaries_globa), 0, 0, 1, 1},
28701  {&__pyx_n_s_nFreeDOF_global, __pyx_k_nFreeDOF_global, sizeof(__pyx_k_nFreeDOF_global), 0, 0, 1, 1},
28702  {&__pyx_n_s_nFreeVDOF_global, __pyx_k_nFreeVDOF_global, sizeof(__pyx_k_nFreeVDOF_global), 0, 0, 1, 1},
28703  {&__pyx_n_s_nI, __pyx_k_nI, sizeof(__pyx_k_nI), 0, 0, 1, 1},
28704  {&__pyx_n_s_nNodes_element, __pyx_k_nNodes_element, sizeof(__pyx_k_nNodes_element), 0, 0, 1, 1},
28705  {&__pyx_n_s_nNodes_global, __pyx_k_nNodes_global, sizeof(__pyx_k_nNodes_global), 0, 0, 1, 1},
28706  {&__pyx_n_s_nNodes_internal, __pyx_k_nNodes_internal, sizeof(__pyx_k_nNodes_internal), 0, 0, 1, 1},
28707  {&__pyx_n_s_nNonzerosInJacobian, __pyx_k_nNonzerosInJacobian, sizeof(__pyx_k_nNonzerosInJacobian), 0, 0, 1, 1},
28708  {&__pyx_n_s_nQuadraturePoints, __pyx_k_nQuadraturePoints, sizeof(__pyx_k_nQuadraturePoints), 0, 0, 1, 1},
28709  {&__pyx_n_s_nQuadraturePoints_element, __pyx_k_nQuadraturePoints_element, sizeof(__pyx_k_nQuadraturePoints_element), 0, 0, 1, 1},
28710  {&__pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_k_nQuadraturePoints_elementBoundar, sizeof(__pyx_k_nQuadraturePoints_elementBoundar), 0, 0, 1, 1},
28711  {&__pyx_n_s_nQuadraturePoints_elementIn, __pyx_k_nQuadraturePoints_elementIn, sizeof(__pyx_k_nQuadraturePoints_elementIn), 0, 0, 1, 1},
28712  {&__pyx_n_s_nQuadraturePoints_global, __pyx_k_nQuadraturePoints_global, sizeof(__pyx_k_nQuadraturePoints_global), 0, 0, 1, 1},
28713  {&__pyx_n_s_nSpaceIn, __pyx_k_nSpaceIn, sizeof(__pyx_k_nSpaceIn), 0, 0, 1, 1},
28714  {&__pyx_n_s_nSpace_global, __pyx_k_nSpace_global, sizeof(__pyx_k_nSpace_global), 0, 0, 1, 1},
28715  {&__pyx_n_s_nSteps, __pyx_k_nSteps, sizeof(__pyx_k_nSteps), 0, 0, 1, 1},
28716  {&__pyx_n_s_nStepsToDelay, __pyx_k_nStepsToDelay, sizeof(__pyx_k_nStepsToDelay), 0, 0, 1, 1},
28717  {&__pyx_n_s_nVDOF_element, __pyx_k_nVDOF_element, sizeof(__pyx_k_nVDOF_element), 0, 0, 1, 1},
28718  {&__pyx_n_s_n_phi_ip_element, __pyx_k_n_phi_ip_element, sizeof(__pyx_k_n_phi_ip_element), 0, 0, 1, 1},
28719  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
28720  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
28721  {&__pyx_n_s_nc, __pyx_k_nc, sizeof(__pyx_k_nc), 0, 0, 1, 1},
28722  {&__pyx_n_s_nd, __pyx_k_nd, sizeof(__pyx_k_nd), 0, 0, 1, 1},
28723  {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
28724  {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
28725  {&__pyx_n_s_nodeArray, __pyx_k_nodeArray, sizeof(__pyx_k_nodeArray), 0, 0, 1, 1},
28726  {&__pyx_n_s_nodeVelocityArray, __pyx_k_nodeVelocityArray, sizeof(__pyx_k_nodeVelocityArray), 0, 0, 1, 1},
28727  {&__pyx_n_s_nonlinear, __pyx_k_nonlinear, sizeof(__pyx_k_nonlinear), 0, 0, 1, 1},
28728  {&__pyx_n_s_nonlinear_function_evaluations, __pyx_k_nonlinear_function_evaluations, sizeof(__pyx_k_nonlinear_function_evaluations), 0, 0, 1, 1},
28729  {&__pyx_n_s_nonlinear_function_jacobian_eval, __pyx_k_nonlinear_function_jacobian_eval, sizeof(__pyx_k_nonlinear_function_jacobian_eval), 0, 0, 1, 1},
28730  {&__pyx_n_s_normal_ref, __pyx_k_normal_ref, sizeof(__pyx_k_normal_ref), 0, 0, 1, 1},
28731  {&__pyx_n_s_numDiff, __pyx_k_numDiff, sizeof(__pyx_k_numDiff), 0, 0, 1, 1},
28732  {&__pyx_n_s_numDiff_last, __pyx_k_numDiff_last, sizeof(__pyx_k_numDiff_last), 0, 0, 1, 1},
28733  {&__pyx_n_s_numericalFlux, __pyx_k_numericalFlux, sizeof(__pyx_k_numericalFlux), 0, 0, 1, 1},
28734  {&__pyx_n_s_numericalFluxType, __pyx_k_numericalFluxType, sizeof(__pyx_k_numericalFluxType), 0, 0, 1, 1},
28735  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
28736  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
28737  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
28738  {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
28739  {&__pyx_n_s_offset_u, __pyx_k_offset_u, sizeof(__pyx_k_offset_u), 0, 0, 1, 1},
28740  {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 1},
28741  {&__pyx_n_s_outFlow, __pyx_k_outFlow, sizeof(__pyx_k_outFlow), 0, 0, 1, 1},
28742  {&__pyx_n_s_pdb, __pyx_k_pdb, sizeof(__pyx_k_pdb), 0, 0, 1, 1},
28743  {&__pyx_n_s_penalty, __pyx_k_penalty, sizeof(__pyx_k_penalty), 0, 0, 1, 1},
28744  {&__pyx_n_s_penalty_constant, __pyx_k_penalty_constant, sizeof(__pyx_k_penalty_constant), 0, 0, 1, 1},
28745  {&__pyx_n_s_penalty_power, __pyx_k_penalty_power, sizeof(__pyx_k_penalty_power), 0, 0, 1, 1},
28746  {&__pyx_n_s_periodicDirichletConditions, __pyx_k_periodicDirichletConditions, sizeof(__pyx_k_periodicDirichletConditions), 0, 0, 1, 1},
28747  {&__pyx_n_s_phi, __pyx_k_phi, sizeof(__pyx_k_phi), 0, 0, 1, 1},
28748  {&__pyx_n_s_phiDict, __pyx_k_phiDict, sizeof(__pyx_k_phiDict), 0, 0, 1, 1},
28749  {&__pyx_n_s_phiTrialIsTrial, __pyx_k_phiTrialIsTrial, sizeof(__pyx_k_phiTrialIsTrial), 0, 0, 1, 1},
28750  {&__pyx_n_s_phi_ip, __pyx_k_phi_ip, sizeof(__pyx_k_phi_ip), 0, 0, 1, 1},
28751  {&__pyx_n_s_phi_k, __pyx_k_phi_k, sizeof(__pyx_k_phi_k), 0, 0, 1, 1},
28752  {&__pyx_n_s_points_elementBoundaryQuadrature, __pyx_k_points_elementBoundaryQuadrature, sizeof(__pyx_k_points_elementBoundaryQuadrature), 0, 0, 1, 1},
28753  {&__pyx_n_s_potential, __pyx_k_potential, sizeof(__pyx_k_potential), 0, 0, 1, 1},
28754  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
28755  {&__pyx_n_s_proteus, __pyx_k_proteus, sizeof(__pyx_k_proteus), 0, 0, 1, 1},
28756  {&__pyx_n_s_proteus_FemTools, __pyx_k_proteus_FemTools, sizeof(__pyx_k_proteus_FemTools), 0, 0, 1, 1},
28757  {&__pyx_n_s_proteus_NonlinearSolvers, __pyx_k_proteus_NonlinearSolvers, sizeof(__pyx_k_proteus_NonlinearSolvers), 0, 0, 1, 1},
28758  {&__pyx_n_s_proteus_Profiling, __pyx_k_proteus_Profiling, sizeof(__pyx_k_proteus_Profiling), 0, 0, 1, 1},
28759  {&__pyx_n_s_proteus_ShockCapturing, __pyx_k_proteus_ShockCapturing, sizeof(__pyx_k_proteus_ShockCapturing), 0, 0, 1, 1},
28760  {&__pyx_n_s_proteus_SubgridError, __pyx_k_proteus_SubgridError, sizeof(__pyx_k_proteus_SubgridError), 0, 0, 1, 1},
28761  {&__pyx_n_s_proteus_Transport, __pyx_k_proteus_Transport, sizeof(__pyx_k_proteus_Transport), 0, 0, 1, 1},
28762  {&__pyx_n_s_proteus_TransportCoefficients, __pyx_k_proteus_TransportCoefficients, sizeof(__pyx_k_proteus_TransportCoefficients), 0, 0, 1, 1},
28763  {&__pyx_n_s_proteus_ctransportCoefficients, __pyx_k_proteus_ctransportCoefficients, sizeof(__pyx_k_proteus_ctransportCoefficients), 0, 0, 1, 1},
28764  {&__pyx_n_s_proteus_flcbdfWrappers, __pyx_k_proteus_flcbdfWrappers, sizeof(__pyx_k_proteus_flcbdfWrappers), 0, 0, 1, 1},
28765  {&__pyx_n_s_psi, __pyx_k_psi, sizeof(__pyx_k_psi), 0, 0, 1, 1},
28766  {&__pyx_n_s_psi_trace, __pyx_k_psi_trace, sizeof(__pyx_k_psi_trace), 0, 0, 1, 1},
28767  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
28768  {&__pyx_n_s_q_a, __pyx_k_q_a, sizeof(__pyx_k_q_a), 0, 0, 1, 1},
28769  {&__pyx_n_s_q_numDiff_u, __pyx_k_q_numDiff_u, sizeof(__pyx_k_q_numDiff_u), 0, 0, 1, 1},
28770  {&__pyx_n_s_q_numDiff_u_last, __pyx_k_q_numDiff_u_last, sizeof(__pyx_k_q_numDiff_u_last), 0, 0, 1, 1},
28771  {&__pyx_n_s_q_r, __pyx_k_q_r, sizeof(__pyx_k_q_r), 0, 0, 1, 1},
28772  {&__pyx_n_s_q_v, __pyx_k_q_v, sizeof(__pyx_k_q_v), 0, 0, 1, 1},
28773  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
28774  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
28775  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
28776  {&__pyx_n_s_reaction, __pyx_k_reaction, sizeof(__pyx_k_reaction), 0, 0, 1, 1},
28777  {&__pyx_n_s_reactionLumping, __pyx_k_reactionLumping, sizeof(__pyx_k_reactionLumping), 0, 0, 1, 1},
28778  {&__pyx_n_s_referenceFiniteElement, __pyx_k_referenceFiniteElement, sizeof(__pyx_k_referenceFiniteElement), 0, 0, 1, 1},
28779  {&__pyx_n_s_reuse_test_trial_quadrature, __pyx_k_reuse_test_trial_quadrature, sizeof(__pyx_k_reuse_test_trial_quadrature), 0, 0, 1, 1},
28780  {&__pyx_n_s_reuse_trial_and_test_quadrature, __pyx_k_reuse_trial_and_test_quadrature, sizeof(__pyx_k_reuse_trial_and_test_quadrature), 0, 0, 1, 1},
28781  {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
28782  {&__pyx_n_s_sc_alpha, __pyx_k_sc_alpha, sizeof(__pyx_k_sc_alpha), 0, 0, 1, 1},
28783  {&__pyx_n_s_sc_beta, __pyx_k_sc_beta, sizeof(__pyx_k_sc_beta), 0, 0, 1, 1},
28784  {&__pyx_n_s_sc_uref, __pyx_k_sc_uref, sizeof(__pyx_k_sc_uref), 0, 0, 1, 1},
28785  {&__pyx_n_s_scalars_elementBoundaryQuadratur, __pyx_k_scalars_elementBoundaryQuadratur, sizeof(__pyx_k_scalars_elementBoundaryQuadratur), 0, 0, 1, 1},
28786  {&__pyx_n_s_sd, __pyx_k_sd, sizeof(__pyx_k_sd), 0, 0, 1, 1},
28787  {&__pyx_n_s_sdInfo, __pyx_k_sdInfo, sizeof(__pyx_k_sdInfo), 0, 0, 1, 1},
28788  {&__pyx_n_s_sdInfo_u_u_colind, __pyx_k_sdInfo_u_u_colind, sizeof(__pyx_k_sdInfo_u_u_colind), 0, 0, 1, 1},
28789  {&__pyx_n_s_sdInfo_u_u_rowptr, __pyx_k_sdInfo_u_u_rowptr, sizeof(__pyx_k_sdInfo_u_u_rowptr), 0, 0, 1, 1},
28790  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
28791  {&__pyx_n_s_setDirichletValues, __pyx_k_setDirichletValues, sizeof(__pyx_k_setDirichletValues), 0, 0, 1, 1},
28792  {&__pyx_n_s_setFlow, __pyx_k_setFlow, sizeof(__pyx_k_setFlow), 0, 0, 1, 1},
28793  {&__pyx_n_s_setFromOptions, __pyx_k_setFromOptions, sizeof(__pyx_k_setFromOptions), 0, 0, 1, 1},
28794  {&__pyx_n_s_setUnknowns, __pyx_k_setUnknowns, sizeof(__pyx_k_setUnknowns), 0, 0, 1, 1},
28795  {&__pyx_n_s_setupFieldStrides, __pyx_k_setupFieldStrides, sizeof(__pyx_k_setupFieldStrides), 0, 0, 1, 1},
28796  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
28797  {&__pyx_n_s_shockCapturing, __pyx_k_shockCapturing, sizeof(__pyx_k_shockCapturing), 0, 0, 1, 1},
28798  {&__pyx_n_s_shockCapturingDiffusion, __pyx_k_shockCapturingDiffusion, sizeof(__pyx_k_shockCapturingDiffusion), 0, 0, 1, 1},
28799  {&__pyx_n_s_shockCapturingFactor, __pyx_k_shockCapturingFactor, sizeof(__pyx_k_shockCapturingFactor), 0, 0, 1, 1},
28800  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
28801  {&__pyx_n_s_sparseDiffusionTensors, __pyx_k_sparseDiffusionTensors, sizeof(__pyx_k_sparseDiffusionTensors), 0, 0, 1, 1},
28802  {&__pyx_n_s_stab, __pyx_k_stab, sizeof(__pyx_k_stab), 0, 0, 1, 1},
28803  {&__pyx_n_s_stabilization, __pyx_k_stabilization, sizeof(__pyx_k_stabilization), 0, 0, 1, 1},
28804  {&__pyx_n_s_stabilizationIsNonlinear, __pyx_k_stabilizationIsNonlinear, sizeof(__pyx_k_stabilizationIsNonlinear), 0, 0, 1, 1},
28805  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
28806  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
28807  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
28808  {&__pyx_n_s_stressTraceBoundaryConditionsSet, __pyx_k_stressTraceBoundaryConditionsSet, sizeof(__pyx_k_stressTraceBoundaryConditionsSet), 0, 0, 1, 1},
28809  {&__pyx_n_s_stride, __pyx_k_stride, sizeof(__pyx_k_stride), 0, 0, 1, 1},
28810  {&__pyx_kp_s_stride_offset, __pyx_k_stride_offset, sizeof(__pyx_k_stride_offset), 0, 0, 1, 0},
28811  {&__pyx_n_s_stride_u, __pyx_k_stride_u, sizeof(__pyx_k_stride_u), 0, 0, 1, 1},
28812  {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
28813  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
28814  {&__pyx_n_s_tLast_mesh, __pyx_k_tLast_mesh, sizeof(__pyx_k_tLast_mesh), 0, 0, 1, 1},
28815  {&__pyx_n_s_tensors_elementBoundaryQuadratur, __pyx_k_tensors_elementBoundaryQuadratur, sizeof(__pyx_k_tensors_elementBoundaryQuadratur), 0, 0, 1, 1},
28816  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
28817  {&__pyx_n_s_testIsTrial, __pyx_k_testIsTrial, sizeof(__pyx_k_testIsTrial), 0, 0, 1, 1},
28818  {&__pyx_n_s_testSpace, __pyx_k_testSpace, sizeof(__pyx_k_testSpace), 0, 0, 1, 1},
28819  {&__pyx_n_s_testSpaceDict, __pyx_k_testSpaceDict, sizeof(__pyx_k_testSpaceDict), 0, 0, 1, 1},
28820  {&__pyx_n_s_timeIntegration, __pyx_k_timeIntegration, sizeof(__pyx_k_timeIntegration), 0, 0, 1, 1},
28821  {&__pyx_n_s_timeTerm, __pyx_k_timeTerm, sizeof(__pyx_k_timeTerm), 0, 0, 1, 1},
28822  {&__pyx_n_s_timeVaryingCoefficients, __pyx_k_timeVaryingCoefficients, sizeof(__pyx_k_timeVaryingCoefficients), 0, 0, 1, 1},
28823  {&__pyx_kp_s_to_reuse_test_trial_quad_all_fem, __pyx_k_to_reuse_test_trial_quad_all_fem, sizeof(__pyx_k_to_reuse_test_trial_quad_all_fem), 0, 0, 1, 0},
28824  {&__pyx_n_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 1},
28825  {&__pyx_n_s_uDict, __pyx_k_uDict, sizeof(__pyx_k_uDict), 0, 0, 1, 1},
28826  {&__pyx_n_s_u_dof, __pyx_k_u_dof, sizeof(__pyx_k_u_dof), 0, 0, 1, 1},
28827  {&__pyx_n_s_u_grad_test_ref, __pyx_k_u_grad_test_ref, sizeof(__pyx_k_u_grad_test_ref), 0, 0, 1, 1},
28828  {&__pyx_n_s_u_grad_test_trace_ref, __pyx_k_u_grad_test_trace_ref, sizeof(__pyx_k_u_grad_test_trace_ref), 0, 0, 1, 1},
28829  {&__pyx_n_s_u_grad_trial_ref, __pyx_k_u_grad_trial_ref, sizeof(__pyx_k_u_grad_trial_ref), 0, 0, 1, 1},
28830  {&__pyx_n_s_u_grad_trial_trace_ref, __pyx_k_u_grad_trial_trace_ref, sizeof(__pyx_k_u_grad_trial_trace_ref), 0, 0, 1, 1},
28831  {&__pyx_n_s_u_j, __pyx_k_u_j, sizeof(__pyx_k_u_j), 0, 0, 1, 1},
28832  {&__pyx_n_s_u_l2g, __pyx_k_u_l2g, sizeof(__pyx_k_u_l2g), 0, 0, 1, 1},
28833  {&__pyx_n_s_u_test_ref, __pyx_k_u_test_ref, sizeof(__pyx_k_u_test_ref), 0, 0, 1, 1},
28834  {&__pyx_n_s_u_test_trace_ref, __pyx_k_u_test_trace_ref, sizeof(__pyx_k_u_test_trace_ref), 0, 0, 1, 1},
28835  {&__pyx_n_s_u_trial_ref, __pyx_k_u_trial_ref, sizeof(__pyx_k_u_trial_ref), 0, 0, 1, 1},
28836  {&__pyx_n_s_u_trial_trace_ref, __pyx_k_u_trial_trace_ref, sizeof(__pyx_k_u_trial_trace_ref), 0, 0, 1, 1},
28837  {&__pyx_n_s_ua, __pyx_k_ua, sizeof(__pyx_k_ua), 0, 0, 1, 1},
28838  {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
28839  {&__pyx_n_s_updateLocal2Global, __pyx_k_updateLocal2Global, sizeof(__pyx_k_updateLocal2Global), 0, 0, 1, 1},
28840  {&__pyx_n_s_updateShockCapturingHistory, __pyx_k_updateShockCapturingHistory, sizeof(__pyx_k_updateShockCapturingHistory), 0, 0, 1, 1},
28841  {&__pyx_n_s_updateSubgridErrorHistory, __pyx_k_updateSubgridErrorHistory, sizeof(__pyx_k_updateSubgridErrorHistory), 0, 0, 1, 1},
28842  {&__pyx_n_s_useMetrics, __pyx_k_useMetrics, sizeof(__pyx_k_useMetrics), 0, 0, 1, 1},
28843  {&__pyx_n_s_useSparseDiffusion, __pyx_k_useSparseDiffusion, sizeof(__pyx_k_useSparseDiffusion), 0, 0, 1, 1},
28844  {&__pyx_n_s_useWeakDirichletConditions, __pyx_k_useWeakDirichletConditions, sizeof(__pyx_k_useWeakDirichletConditions), 0, 0, 1, 1},
28845  {&__pyx_n_s_usesGradientStabilization, __pyx_k_usesGradientStabilization, sizeof(__pyx_k_usesGradientStabilization), 0, 0, 1, 1},
28846  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
28847  {&__pyx_n_s_variableNames, __pyx_k_variableNames, sizeof(__pyx_k_variableNames), 0, 0, 1, 1},
28848  {&__pyx_n_s_vectors_elementBoundaryQuadratur, __pyx_k_vectors_elementBoundaryQuadratur, sizeof(__pyx_k_vectors_elementBoundaryQuadratur), 0, 0, 1, 1},
28849  {&__pyx_n_s_velocity, __pyx_k_velocity, sizeof(__pyx_k_velocity), 0, 0, 1, 1},
28850  {&__pyx_n_s_velocityPostProcessor, __pyx_k_velocityPostProcessor, sizeof(__pyx_k_velocityPostProcessor), 0, 0, 1, 1},
28851  {&__pyx_kp_s_velocity_postprocessor, __pyx_k_velocity_postprocessor, sizeof(__pyx_k_velocity_postprocessor), 0, 0, 1, 0},
28852  {&__pyx_n_s_vt, __pyx_k_vt, sizeof(__pyx_k_vt), 0, 0, 1, 1},
28853  {&__pyx_n_s_weakDirichletConditions, __pyx_k_weakDirichletConditions, sizeof(__pyx_k_weakDirichletConditions), 0, 0, 1, 1},
28854  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
28855  {&__pyx_n_s_zeroJacobian_CSR, __pyx_k_zeroJacobian_CSR, sizeof(__pyx_k_zeroJacobian_CSR), 0, 0, 1, 1},
28856  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
28857  {0, 0, 0, 0, 0, 0, 0}
28858 };
28859 static int __Pyx_InitCachedBuiltins(void) {
28860  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 422, __pyx_L1_error)
28861  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 683, __pyx_L1_error)
28862  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 831, __pyx_L1_error)
28863  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 218, __pyx_L1_error)
28864  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 799, __pyx_L1_error)
28865  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 989, __pyx_L1_error)
28866  return 0;
28867  __pyx_L1_error:;
28868  return -1;
28869 }
28870 
28871 static int __Pyx_InitCachedConstants(void) {
28872  __Pyx_RefNannyDeclarations
28873  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
28874 
28875  /* "ADR.pyx":415
28876  * self.nSteps=0
28877  * if self.lag:
28878  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying") # <<<<<<<<<<<<<<
28879  * self.nStepsToDelay=1
28880  * self.lag=False
28881  */
28882  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_ADR_ShockCapturing_lagging_reque); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 415, __pyx_L1_error)
28883  __Pyx_GOTREF(__pyx_tuple_);
28884  __Pyx_GIVEREF(__pyx_tuple_);
28885 
28886  /* "ADR.pyx":429
28887  * if self.lag:
28888  * for ci in range(self.nc):
28889  * self.numDiff_last[ci][:] = self.numDiff[ci] # <<<<<<<<<<<<<<
28890  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
28891  * log("ADR.ShockCapturing: switched to lagged shock capturing")
28892  */
28893  __pyx_slice__2 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__2)) __PYX_ERR(0, 429, __pyx_L1_error)
28894  __Pyx_GOTREF(__pyx_slice__2);
28895  __Pyx_GIVEREF(__pyx_slice__2);
28896 
28897  /* "ADR.pyx":431
28898  * self.numDiff_last[ci][:] = self.numDiff[ci]
28899  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
28900  * log("ADR.ShockCapturing: switched to lagged shock capturing") # <<<<<<<<<<<<<<
28901  * self.lag = True
28902  * self.numDiff_last=[]
28903  */
28904  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_ADR_ShockCapturing_switched_to_l); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 431, __pyx_L1_error)
28905  __Pyx_GOTREF(__pyx_tuple__3);
28906  __Pyx_GIVEREF(__pyx_tuple__3);
28907 
28908  /* "ADR.pyx":500
28909  * potential[i] = {i : 'u'}
28910  * #end i
28911  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'), # <<<<<<<<<<<<<<
28912  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
28913  * TC_base.__init__(self,
28914  */
28915  __pyx_tuple__4 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 500, __pyx_L1_error)
28916  __Pyx_GOTREF(__pyx_tuple__4);
28917  __Pyx_GIVEREF(__pyx_tuple__4);
28918 
28919  /* "ADR.pyx":519
28920  * if cq.has_key(('df',ci,ci)):
28921  * if self.velocity is not None:
28922  * cq[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
28923  * else:
28924  * cq[('df',ci,ci)].flat[:] = 0.0
28925  */
28926  __pyx_slice__5 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 519, __pyx_L1_error)
28927  __Pyx_GOTREF(__pyx_slice__5);
28928  __Pyx_GIVEREF(__pyx_slice__5);
28929  __pyx_tuple__6 = PyTuple_Pack(2, Py_Ellipsis, __pyx_slice__5); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 519, __pyx_L1_error)
28930  __Pyx_GOTREF(__pyx_tuple__6);
28931  __Pyx_GIVEREF(__pyx_tuple__6);
28932 
28933  /* "ADR.pyx":521
28934  * cq[('df',ci,ci)][...,:] = self.velocity
28935  * else:
28936  * cq[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
28937  * for i in range(len(cq[('r',ci)].flat)):
28938  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
28939  */
28940  __pyx_slice__7 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__7)) __PYX_ERR(0, 521, __pyx_L1_error)
28941  __Pyx_GOTREF(__pyx_slice__7);
28942  __Pyx_GIVEREF(__pyx_slice__7);
28943 
28944  /* "ADR.pyx":531
28945  * if c.has_key(('df',ci,ci)):
28946  * if self.velocity is not None:
28947  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
28948  * else:
28949  * c[('df',ci,ci)].flat[:] = 0.0
28950  */
28951  __pyx_slice__8 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 531, __pyx_L1_error)
28952  __Pyx_GOTREF(__pyx_slice__8);
28953  __Pyx_GIVEREF(__pyx_slice__8);
28954  __pyx_tuple__9 = PyTuple_Pack(2, Py_Ellipsis, __pyx_slice__8); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 531, __pyx_L1_error)
28955  __Pyx_GOTREF(__pyx_tuple__9);
28956  __Pyx_GIVEREF(__pyx_tuple__9);
28957 
28958  /* "ADR.pyx":533
28959  * c[('df',ci,ci)][...,:] = self.velocity
28960  * else:
28961  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
28962  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
28963  * for i in range(len(c[('u',ci)].flat)):
28964  */
28965  __pyx_slice__10 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__10)) __PYX_ERR(0, 533, __pyx_L1_error)
28966  __Pyx_GOTREF(__pyx_slice__10);
28967  __Pyx_GIVEREF(__pyx_slice__10);
28968 
28969  /* "ADR.pyx":544
28970  * if c.has_key(('df',ci,ci)):
28971  * if self.velocity is not None:
28972  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
28973  * else:
28974  * c[('df',ci,ci)].flat[:] = 0.0
28975  */
28976  __pyx_slice__11 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 544, __pyx_L1_error)
28977  __Pyx_GOTREF(__pyx_slice__11);
28978  __Pyx_GIVEREF(__pyx_slice__11);
28979  __pyx_tuple__12 = PyTuple_Pack(2, Py_Ellipsis, __pyx_slice__11); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 544, __pyx_L1_error)
28980  __Pyx_GOTREF(__pyx_tuple__12);
28981  __Pyx_GIVEREF(__pyx_tuple__12);
28982 
28983  /* "ADR.pyx":546
28984  * c[('df',ci,ci)][...,:] = self.velocity
28985  * else:
28986  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
28987  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
28988  * for i in range(len(c[('u',ci)].flat)):
28989  */
28990  __pyx_slice__13 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__13)) __PYX_ERR(0, 546, __pyx_L1_error)
28991  __Pyx_GOTREF(__pyx_slice__13);
28992  __Pyx_GIVEREF(__pyx_slice__13);
28993 
28994  /* "ADR.pyx":556
28995  * for ci in range(self.nc):
28996  * if self.velocity is not None:
28997  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
28998  * else:
28999  * c[('df',ci,ci)].flat[:] = 0.0
29000  */
29001  __pyx_slice__14 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__14)) __PYX_ERR(0, 556, __pyx_L1_error)
29002  __Pyx_GOTREF(__pyx_slice__14);
29003  __Pyx_GIVEREF(__pyx_slice__14);
29004  __pyx_tuple__15 = PyTuple_Pack(2, Py_Ellipsis, __pyx_slice__14); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 556, __pyx_L1_error)
29005  __Pyx_GOTREF(__pyx_tuple__15);
29006  __Pyx_GIVEREF(__pyx_tuple__15);
29007 
29008  /* "ADR.pyx":558
29009  * c[('df',ci,ci)][...,:] = self.velocity
29010  * else:
29011  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
29012  * for i in range(len(c[('r',ci)].flat)):
29013  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
29014  */
29015  __pyx_slice__16 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__16)) __PYX_ERR(0, 558, __pyx_L1_error)
29016  __Pyx_GOTREF(__pyx_slice__16);
29017  __Pyx_GIVEREF(__pyx_slice__16);
29018 
29019  /* "ADR.pyx":707
29020  * if elemQuadIsDict:
29021  * if elementQuadrature.has_key(I):
29022  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I] # <<<<<<<<<<<<<<
29023  * else:
29024  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default']
29025  */
29026  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_stab); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 707, __pyx_L1_error)
29027  __Pyx_GOTREF(__pyx_tuple__17);
29028  __Pyx_GIVEREF(__pyx_tuple__17);
29029  __pyx_slice__18 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__18)) __PYX_ERR(0, 707, __pyx_L1_error)
29030  __Pyx_GOTREF(__pyx_slice__18);
29031  __Pyx_GIVEREF(__pyx_slice__18);
29032 
29033  /* "ADR.pyx":709
29034  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
29035  * else:
29036  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default'] # <<<<<<<<<<<<<<
29037  * else:
29038  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
29039  */
29040  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_stab); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 709, __pyx_L1_error)
29041  __Pyx_GOTREF(__pyx_tuple__19);
29042  __Pyx_GIVEREF(__pyx_tuple__19);
29043  __pyx_slice__20 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__20)) __PYX_ERR(0, 709, __pyx_L1_error)
29044  __Pyx_GOTREF(__pyx_slice__20);
29045  __Pyx_GIVEREF(__pyx_slice__20);
29046 
29047  /* "ADR.pyx":711
29048  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default']
29049  * else:
29050  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature # <<<<<<<<<<<<<<
29051  * if self.shockCapturing is not None:
29052  * for ci in self.shockCapturing.components:
29053  */
29054  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_stab); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 711, __pyx_L1_error)
29055  __Pyx_GOTREF(__pyx_tuple__21);
29056  __Pyx_GIVEREF(__pyx_tuple__21);
29057  __pyx_slice__22 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__22)) __PYX_ERR(0, 711, __pyx_L1_error)
29058  __Pyx_GOTREF(__pyx_slice__22);
29059  __Pyx_GIVEREF(__pyx_slice__22);
29060 
29061  /* "ADR.pyx":725
29062  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
29063  * for I in self.coefficients.elementIntegralKeys:
29064  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
29065  * if reactionLumping:
29066  * for ci in self.coefficients.mass.keys():
29067  */
29068  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_n_s_stab); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 725, __pyx_L1_error)
29069  __Pyx_GOTREF(__pyx_tuple__23);
29070  __Pyx_GIVEREF(__pyx_tuple__23);
29071  __pyx_slice__24 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__24)) __PYX_ERR(0, 725, __pyx_L1_error)
29072  __Pyx_GOTREF(__pyx_slice__24);
29073  __Pyx_GIVEREF(__pyx_slice__24);
29074 
29075  /* "ADR.pyx":730
29076  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
29077  * for I in self.coefficients.elementIntegralKeys:
29078  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
29079  * elementBoundaryQuadratureDict={}
29080  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
29081  */
29082  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_n_s_stab); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 730, __pyx_L1_error)
29083  __Pyx_GOTREF(__pyx_tuple__25);
29084  __Pyx_GIVEREF(__pyx_tuple__25);
29085  __pyx_slice__26 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__26)) __PYX_ERR(0, 730, __pyx_L1_error)
29086  __Pyx_GOTREF(__pyx_slice__26);
29087  __Pyx_GIVEREF(__pyx_slice__26);
29088 
29089  /* "ADR.pyx":787
29090  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d')
29091  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
29092  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
29093  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29094  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29095  */
29096  __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 787, __pyx_L1_error)
29097  __Pyx_GOTREF(__pyx_tuple__27);
29098  __Pyx_GIVEREF(__pyx_tuple__27);
29099 
29100  /* "ADR.pyx":788
29101  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
29102  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29103  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d') # <<<<<<<<<<<<<<
29104  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29105  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29106  */
29107  __pyx_tuple__28 = PyTuple_Pack(2, __pyx_kp_s_grad_u, __pyx_int_0); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 788, __pyx_L1_error)
29108  __Pyx_GOTREF(__pyx_tuple__28);
29109  __Pyx_GIVEREF(__pyx_tuple__28);
29110 
29111  /* "ADR.pyx":789
29112  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29113  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29114  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d') # <<<<<<<<<<<<<<
29115  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29116  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29117  */
29118  __pyx_tuple__29 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 789, __pyx_L1_error)
29119  __Pyx_GOTREF(__pyx_tuple__29);
29120  __Pyx_GIVEREF(__pyx_tuple__29);
29121  __pyx_tuple__30 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 789, __pyx_L1_error)
29122  __Pyx_GOTREF(__pyx_tuple__30);
29123  __Pyx_GIVEREF(__pyx_tuple__30);
29124 
29125  /* "ADR.pyx":790
29126  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29127  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29128  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d') # <<<<<<<<<<<<<<
29129  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29130  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29131  */
29132  __pyx_tuple__31 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 790, __pyx_L1_error)
29133  __Pyx_GOTREF(__pyx_tuple__31);
29134  __Pyx_GIVEREF(__pyx_tuple__31);
29135 
29136  /* "ADR.pyx":791
29137  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29138  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29139  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
29140  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29141  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29142  */
29143  __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_s_r, __pyx_int_0); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 791, __pyx_L1_error)
29144  __Pyx_GOTREF(__pyx_tuple__32);
29145  __Pyx_GIVEREF(__pyx_tuple__32);
29146 
29147  /* "ADR.pyx":792
29148  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29149  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29150  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
29151  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29152  *
29153  */
29154  __pyx_tuple__33 = PyTuple_Pack(2, __pyx_n_s_cfl, __pyx_int_0); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 792, __pyx_L1_error)
29155  __Pyx_GOTREF(__pyx_tuple__33);
29156  __Pyx_GIVEREF(__pyx_tuple__33);
29157 
29158  /* "ADR.pyx":793
29159  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29160  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29161  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
29162  *
29163  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29164  */
29165  __pyx_tuple__34 = PyTuple_Pack(3, __pyx_n_s_numDiff, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 793, __pyx_L1_error)
29166  __Pyx_GOTREF(__pyx_tuple__34);
29167  __Pyx_GIVEREF(__pyx_tuple__34);
29168 
29169  /* "ADR.pyx":796
29170  *
29171  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29172  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
29173  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29174  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29175  */
29176  __pyx_tuple__35 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 796, __pyx_L1_error)
29177  __Pyx_GOTREF(__pyx_tuple__35);
29178  __Pyx_GIVEREF(__pyx_tuple__35);
29179 
29180  /* "ADR.pyx":797
29181  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29182  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29183  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i') # <<<<<<<<<<<<<<
29184  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29185  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29186  */
29187  __pyx_tuple__36 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc_flag, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 797, __pyx_L1_error)
29188  __Pyx_GOTREF(__pyx_tuple__36);
29189  __Pyx_GIVEREF(__pyx_tuple__36);
29190 
29191  /* "ADR.pyx":798
29192  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29193  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29194  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
29195  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29196  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29197  */
29198  __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 798, __pyx_L1_error)
29199  __Pyx_GOTREF(__pyx_tuple__37);
29200  __Pyx_GIVEREF(__pyx_tuple__37);
29201 
29202  /* "ADR.pyx":799
29203  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29204  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29205  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i') # <<<<<<<<<<<<<<
29206  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29207  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29208  */
29209  __pyx_tuple__38 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc_flag, __pyx_int_0); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 799, __pyx_L1_error)
29210  __Pyx_GOTREF(__pyx_tuple__38);
29211  __Pyx_GIVEREF(__pyx_tuple__38);
29212 
29213  /* "ADR.pyx":800
29214  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29215  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29216  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
29217  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29218  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29219  */
29220  __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc, __pyx_int_0); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 800, __pyx_L1_error)
29221  __Pyx_GOTREF(__pyx_tuple__39);
29222  __Pyx_GIVEREF(__pyx_tuple__39);
29223 
29224  /* "ADR.pyx":801
29225  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29226  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29227  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d') # <<<<<<<<<<<<<<
29228  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29229  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29230  */
29231  __pyx_tuple__40 = PyTuple_Pack(2, __pyx_kp_s_grad_u, __pyx_int_0); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 801, __pyx_L1_error)
29232  __Pyx_GOTREF(__pyx_tuple__40);
29233  __Pyx_GIVEREF(__pyx_tuple__40);
29234 
29235  /* "ADR.pyx":802
29236  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29237  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29238  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d') # <<<<<<<<<<<<<<
29239  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29240  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29241  */
29242  __pyx_tuple__41 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 802, __pyx_L1_error)
29243  __Pyx_GOTREF(__pyx_tuple__41);
29244  __Pyx_GIVEREF(__pyx_tuple__41);
29245  __pyx_tuple__42 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 802, __pyx_L1_error)
29246  __Pyx_GOTREF(__pyx_tuple__42);
29247  __Pyx_GIVEREF(__pyx_tuple__42);
29248 
29249  /* "ADR.pyx":803
29250  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29251  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29252  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d') # <<<<<<<<<<<<<<
29253  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29254  *
29255  */
29256  __pyx_tuple__43 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 803, __pyx_L1_error)
29257  __Pyx_GOTREF(__pyx_tuple__43);
29258  __Pyx_GIVEREF(__pyx_tuple__43);
29259 
29260  /* "ADR.pyx":804
29261  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29262  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29263  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
29264  *
29265  * self.points_elementBoundaryQuadrature= set()
29266  */
29267  __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_s_r, __pyx_int_0); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 804, __pyx_L1_error)
29268  __Pyx_GOTREF(__pyx_tuple__44);
29269  __Pyx_GIVEREF(__pyx_tuple__44);
29270 
29271  /* "ADR.pyx":810
29272  * self.vectors_elementBoundaryQuadrature= set()
29273  * self.tensors_elementBoundaryQuadrature= set()
29274  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
29275  * self.inflowBoundaryBC = {}
29276  * self.inflowBoundaryBC_values = {}
29277  */
29278  __pyx_tuple__45 = PyTuple_Pack(2, __pyx_kp_s_element_and_element_boundary_Jac, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 810, __pyx_L1_error)
29279  __Pyx_GOTREF(__pyx_tuple__45);
29280  __Pyx_GIVEREF(__pyx_tuple__45);
29281 
29282  /* "ADR.pyx":836
29283  * del self.internalNodes
29284  * self.internalNodes = None
29285  * log("Updating local to global mappings",2) # <<<<<<<<<<<<<<
29286  * self.updateLocal2Global()
29287  * log("Building time integration object",2)
29288  */
29289  __pyx_tuple__46 = PyTuple_Pack(2, __pyx_kp_s_Updating_local_to_global_mapping, __pyx_int_2); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 836, __pyx_L1_error)
29290  __Pyx_GOTREF(__pyx_tuple__46);
29291  __Pyx_GIVEREF(__pyx_tuple__46);
29292 
29293  /* "ADR.pyx":838
29294  * log("Updating local to global mappings",2)
29295  * self.updateLocal2Global()
29296  * log("Building time integration object",2) # <<<<<<<<<<<<<<
29297  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
29298  * #mwf for interpolating subgrid error for gradients etc
29299  */
29300  __pyx_tuple__47 = PyTuple_Pack(2, __pyx_kp_s_Building_time_integration_object, __pyx_int_2); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 838, __pyx_L1_error)
29301  __Pyx_GOTREF(__pyx_tuple__47);
29302  __Pyx_GIVEREF(__pyx_tuple__47);
29303 
29304  /* "ADR.pyx":839
29305  * self.updateLocal2Global()
29306  * log("Building time integration object",2)
29307  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
29308  * #mwf for interpolating subgrid error for gradients etc
29309  * if self.stabilization and self.stabilization.usesGradientStabilization:
29310  */
29311  __pyx_tuple__48 = PyTuple_Pack(2, __pyx_kp_s_inflowBC_internalNodes_updateLoc, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 839, __pyx_L1_error)
29312  __Pyx_GOTREF(__pyx_tuple__48);
29313  __Pyx_GIVEREF(__pyx_tuple__48);
29314 
29315  /* "ADR.pyx":848
29316  * if options is not None:
29317  * self.timeIntegration.setFromOptions(options)
29318  * log(memory("TimeIntegration","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
29319  * log("Calculating numerical quadrature formulas",2)
29320  * self.calculateQuadrature()
29321  */
29322  __pyx_tuple__49 = PyTuple_Pack(2, __pyx_n_s_TimeIntegration, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 848, __pyx_L1_error)
29323  __Pyx_GOTREF(__pyx_tuple__49);
29324  __Pyx_GIVEREF(__pyx_tuple__49);
29325 
29326  /* "ADR.pyx":849
29327  * self.timeIntegration.setFromOptions(options)
29328  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
29329  * log("Calculating numerical quadrature formulas",2) # <<<<<<<<<<<<<<
29330  * self.calculateQuadrature()
29331  *
29332  */
29333  __pyx_tuple__50 = PyTuple_Pack(2, __pyx_kp_s_Calculating_numerical_quadrature, __pyx_int_2); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 849, __pyx_L1_error)
29334  __Pyx_GOTREF(__pyx_tuple__50);
29335  __Pyx_GIVEREF(__pyx_tuple__50);
29336 
29337  /* "ADR.pyx":859
29338  * self.setupFieldStrides()
29339  *
29340  * log(memory("stride+offset","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
29341  * if numericalFluxType is not None:
29342  * if options is None or options.periodicDirichletConditions is None:
29343  */
29344  __pyx_tuple__51 = PyTuple_Pack(2, __pyx_kp_s_stride_offset, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 859, __pyx_L1_error)
29345  __Pyx_GOTREF(__pyx_tuple__51);
29346  __Pyx_GIVEREF(__pyx_tuple__51);
29347 
29348  /* "ADR.pyx":876
29349  * #set penalty terms
29350  * #cek todo move into numerical flux initialization
29351  * if self.ebq_global.has_key('penalty'): # <<<<<<<<<<<<<<
29352  * for ebN in range(self.mesh.nElementBoundaries_global):
29353  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
29354  */
29355  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_n_s_penalty); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 876, __pyx_L1_error)
29356  __Pyx_GOTREF(__pyx_tuple__52);
29357  __Pyx_GIVEREF(__pyx_tuple__52);
29358 
29359  /* "ADR.pyx":882
29360  * #penalty term
29361  * #cek move to Numerical flux initialization
29362  * if self.ebqe.has_key('penalty'): # <<<<<<<<<<<<<<
29363  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
29364  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
29365  */
29366  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_n_s_penalty); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 882, __pyx_L1_error)
29367  __Pyx_GOTREF(__pyx_tuple__53);
29368  __Pyx_GIVEREF(__pyx_tuple__53);
29369 
29370  /* "ADR.pyx":887
29371  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
29372  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
29373  * log(memory("numericalFlux","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
29374  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray
29375  * #use post processing tools to get conservative fluxes, None by default
29376  */
29377  __pyx_tuple__54 = PyTuple_Pack(2, __pyx_n_s_numericalFlux, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 887, __pyx_L1_error)
29378  __Pyx_GOTREF(__pyx_tuple__54);
29379  __Pyx_GIVEREF(__pyx_tuple__54);
29380 
29381  /* "ADR.pyx":892
29382  * from proteus import PostProcessingTools
29383  * self.velocityPostProcessor = PostProcessingTools.VelocityPostProcessingChooser(self)
29384  * log(memory("velocity postprocessor","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
29385  * #helper for writing out data storage
29386  * from proteus import Archiver
29387  */
29388  __pyx_tuple__55 = PyTuple_Pack(2, __pyx_kp_s_velocity_postprocessor, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 892, __pyx_L1_error)
29389  __Pyx_GOTREF(__pyx_tuple__55);
29390  __Pyx_GIVEREF(__pyx_tuple__55);
29391 
29392  /* "ADR.pyx":943
29393  * Calculate the element residuals and add in to the global residual
29394  * """
29395  * r.fill(0.0) # <<<<<<<<<<<<<<
29396  * #Load the unknowns into the finite element dof
29397  * self.setUnknowns(u)
29398  */
29399  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 943, __pyx_L1_error)
29400  __Pyx_GOTREF(__pyx_tuple__56);
29401  __Pyx_GIVEREF(__pyx_tuple__56);
29402 
29403  /* "ADR.pyx":954
29404  * self.mesh.nodeArray,
29405  * self.mesh.elementNodesArray,
29406  * self.elementQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
29407  * self.u[0].femSpace.psi,
29408  * self.u[0].femSpace.grad_psi,
29409  */
29410  __pyx_tuple__57 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 954, __pyx_L1_error)
29411  __Pyx_GOTREF(__pyx_tuple__57);
29412  __Pyx_GIVEREF(__pyx_tuple__57);
29413 
29414  /* "ADR.pyx":960
29415  * self.u[0].femSpace.grad_psi,
29416  * self.mesh.elementDiametersArray,
29417  * self.q[('cfl',0)], # <<<<<<<<<<<<<<
29418  * self.shockCapturing.shockCapturingFactor,
29419  * self.coefficients.sc_uref,
29420  */
29421  __pyx_tuple__58 = PyTuple_Pack(2, __pyx_n_s_cfl, __pyx_int_0); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 960, __pyx_L1_error)
29422  __Pyx_GOTREF(__pyx_tuple__58);
29423  __Pyx_GIVEREF(__pyx_tuple__58);
29424 
29425  /* "ADR.pyx":968
29426  * self.u[0].femSpace.elementMaps.psi_trace,
29427  * self.u[0].femSpace.elementMaps.grad_psi_trace,
29428  * self.elementBoundaryQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
29429  * self.u[0].femSpace.psi_trace,
29430  * self.u[0].femSpace.grad_psi_trace,
29431  */
29432  __pyx_tuple__59 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 968, __pyx_L1_error)
29433  __Pyx_GOTREF(__pyx_tuple__59);
29434  __Pyx_GIVEREF(__pyx_tuple__59);
29435 
29436  /* "ADR.pyx":979
29437  * self.u[0].femSpace.dofMap.l2g,
29438  * self.u[0].dof,
29439  * self.coefficients.sdInfo[(0,0)][0], # <<<<<<<<<<<<<<
29440  * self.coefficients.sdInfo[(0,0)][1],
29441  * self.q[('a',0,0)],
29442  */
29443  __pyx_tuple__60 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 979, __pyx_L1_error)
29444  __Pyx_GOTREF(__pyx_tuple__60);
29445  __Pyx_GIVEREF(__pyx_tuple__60);
29446 
29447  /* "ADR.pyx":980
29448  * self.u[0].dof,
29449  * self.coefficients.sdInfo[(0,0)][0],
29450  * self.coefficients.sdInfo[(0,0)][1], # <<<<<<<<<<<<<<
29451  * self.q[('a',0,0)],
29452  * self.q[('df',0,0)],
29453  */
29454  __pyx_tuple__61 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 980, __pyx_L1_error)
29455  __Pyx_GOTREF(__pyx_tuple__61);
29456  __Pyx_GIVEREF(__pyx_tuple__61);
29457 
29458  /* "ADR.pyx":981
29459  * self.coefficients.sdInfo[(0,0)][0],
29460  * self.coefficients.sdInfo[(0,0)][1],
29461  * self.q[('a',0,0)], # <<<<<<<<<<<<<<
29462  * self.q[('df',0,0)],
29463  * self.q[('r',0)],
29464  */
29465  __pyx_tuple__62 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 981, __pyx_L1_error)
29466  __Pyx_GOTREF(__pyx_tuple__62);
29467  __Pyx_GIVEREF(__pyx_tuple__62);
29468 
29469  /* "ADR.pyx":982
29470  * self.coefficients.sdInfo[(0,0)][1],
29471  * self.q[('a',0,0)],
29472  * self.q[('df',0,0)], # <<<<<<<<<<<<<<
29473  * self.q[('r',0)],
29474  * self.shockCapturing.lag,
29475  */
29476  __pyx_tuple__63 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 982, __pyx_L1_error)
29477  __Pyx_GOTREF(__pyx_tuple__63);
29478  __Pyx_GIVEREF(__pyx_tuple__63);
29479 
29480  /* "ADR.pyx":983
29481  * self.q[('a',0,0)],
29482  * self.q[('df',0,0)],
29483  * self.q[('r',0)], # <<<<<<<<<<<<<<
29484  * self.shockCapturing.lag,
29485  * self.shockCapturing.shockCapturingFactor,
29486  */
29487  __pyx_tuple__64 = PyTuple_Pack(2, __pyx_n_s_r, __pyx_int_0); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 983, __pyx_L1_error)
29488  __Pyx_GOTREF(__pyx_tuple__64);
29489  __Pyx_GIVEREF(__pyx_tuple__64);
29490 
29491  /* "ADR.pyx":995
29492  * self.mesh.elementBoundaryElementsArray,
29493  * self.mesh.elementBoundaryLocalElementBoundariesArray,
29494  * self.ebqe[('a',0,0)], # <<<<<<<<<<<<<<
29495  * self.ebqe[('df',0,0)],
29496  * self.numericalFlux.isDOFBoundary[0],
29497  */
29498  __pyx_tuple__65 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 995, __pyx_L1_error)
29499  __Pyx_GOTREF(__pyx_tuple__65);
29500  __Pyx_GIVEREF(__pyx_tuple__65);
29501 
29502  /* "ADR.pyx":996
29503  * self.mesh.elementBoundaryLocalElementBoundariesArray,
29504  * self.ebqe[('a',0,0)],
29505  * self.ebqe[('df',0,0)], # <<<<<<<<<<<<<<
29506  * self.numericalFlux.isDOFBoundary[0],
29507  * self.numericalFlux.ebqe[('u',0)],
29508  */
29509  __pyx_tuple__66 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 996, __pyx_L1_error)
29510  __Pyx_GOTREF(__pyx_tuple__66);
29511  __Pyx_GIVEREF(__pyx_tuple__66);
29512 
29513  /* "ADR.pyx":998
29514  * self.ebqe[('df',0,0)],
29515  * self.numericalFlux.isDOFBoundary[0],
29516  * self.numericalFlux.ebqe[('u',0)], # <<<<<<<<<<<<<<
29517  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
29518  * self.ebqe[('advectiveFlux_bc_flag',0)],
29519  */
29520  __pyx_tuple__67 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 998, __pyx_L1_error)
29521  __Pyx_GOTREF(__pyx_tuple__67);
29522  __Pyx_GIVEREF(__pyx_tuple__67);
29523 
29524  /* "ADR.pyx":999
29525  * self.numericalFlux.isDOFBoundary[0],
29526  * self.numericalFlux.ebqe[('u',0)],
29527  * self.ebqe[('diffusiveFlux_bc_flag',0,0)], # <<<<<<<<<<<<<<
29528  * self.ebqe[('advectiveFlux_bc_flag',0)],
29529  * self.ebqe[('diffusiveFlux_bc',0,0)],
29530  */
29531  __pyx_tuple__68 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc_flag, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 999, __pyx_L1_error)
29532  __Pyx_GOTREF(__pyx_tuple__68);
29533  __Pyx_GIVEREF(__pyx_tuple__68);
29534 
29535  /* "ADR.pyx":1000
29536  * self.numericalFlux.ebqe[('u',0)],
29537  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
29538  * self.ebqe[('advectiveFlux_bc_flag',0)], # <<<<<<<<<<<<<<
29539  * self.ebqe[('diffusiveFlux_bc',0,0)],
29540  * self.ebqe[('advectiveFlux_bc',0)],
29541  */
29542  __pyx_tuple__69 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc_flag, __pyx_int_0); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 1000, __pyx_L1_error)
29543  __Pyx_GOTREF(__pyx_tuple__69);
29544  __Pyx_GIVEREF(__pyx_tuple__69);
29545 
29546  /* "ADR.pyx":1001
29547  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
29548  * self.ebqe[('advectiveFlux_bc_flag',0)],
29549  * self.ebqe[('diffusiveFlux_bc',0,0)], # <<<<<<<<<<<<<<
29550  * self.ebqe[('advectiveFlux_bc',0)],
29551  * self.ebqe['penalty'],
29552  */
29553  __pyx_tuple__70 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 1001, __pyx_L1_error)
29554  __Pyx_GOTREF(__pyx_tuple__70);
29555  __Pyx_GIVEREF(__pyx_tuple__70);
29556 
29557  /* "ADR.pyx":1002
29558  * self.ebqe[('advectiveFlux_bc_flag',0)],
29559  * self.ebqe[('diffusiveFlux_bc',0,0)],
29560  * self.ebqe[('advectiveFlux_bc',0)], # <<<<<<<<<<<<<<
29561  * self.ebqe['penalty'],
29562  * self.numericalFlux.boundaryAdjoint_sigma)
29563  */
29564  __pyx_tuple__71 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc, __pyx_int_0); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 1002, __pyx_L1_error)
29565  __Pyx_GOTREF(__pyx_tuple__71);
29566  __Pyx_GIVEREF(__pyx_tuple__71);
29567 
29568  /* "ADR.pyx":1005
29569  * self.ebqe['penalty'],
29570  * self.numericalFlux.boundaryAdjoint_sigma)
29571  * log("Global residual",level=9,data=r) # <<<<<<<<<<<<<<
29572  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
29573  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
29574  */
29575  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_Global_residual); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 1005, __pyx_L1_error)
29576  __Pyx_GOTREF(__pyx_tuple__72);
29577  __Pyx_GIVEREF(__pyx_tuple__72);
29578 
29579  /* "ADR.pyx":1007
29580  * log("Global residual",level=9,data=r)
29581  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
29582  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError) # <<<<<<<<<<<<<<
29583  * self.nonlinear_function_evaluations += 1
29584  * def getJacobian(self,jacobian):
29585  */
29586  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_Mass_Conservation_Error); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1007, __pyx_L1_error)
29587  __Pyx_GOTREF(__pyx_tuple__73);
29588  __Pyx_GIVEREF(__pyx_tuple__73);
29589 
29590  /* "ADR.pyx":1019
29591  * self.mesh.nodeArray,
29592  * self.mesh.elementNodesArray,
29593  * self.elementQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
29594  * self.u[0].femSpace.psi,
29595  * self.u[0].femSpace.grad_psi,
29596  */
29597  __pyx_tuple__74 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 1019, __pyx_L1_error)
29598  __Pyx_GOTREF(__pyx_tuple__74);
29599  __Pyx_GIVEREF(__pyx_tuple__74);
29600 
29601  /* "ADR.pyx":1025
29602  * self.u[0].femSpace.grad_psi,
29603  * self.mesh.elementDiametersArray,
29604  * self.q[('cfl',0)], # <<<<<<<<<<<<<<
29605  * self.shockCapturing.shockCapturingFactor,
29606  * self.coefficients.sc_uref,
29607  */
29608  __pyx_tuple__75 = PyTuple_Pack(2, __pyx_n_s_cfl, __pyx_int_0); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1025, __pyx_L1_error)
29609  __Pyx_GOTREF(__pyx_tuple__75);
29610  __Pyx_GIVEREF(__pyx_tuple__75);
29611 
29612  /* "ADR.pyx":1033
29613  * self.u[0].femSpace.elementMaps.psi_trace,
29614  * self.u[0].femSpace.elementMaps.grad_psi_trace,
29615  * self.elementBoundaryQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
29616  * self.u[0].femSpace.psi_trace,
29617  * self.u[0].femSpace.grad_psi_trace,
29618  */
29619  __pyx_tuple__76 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1033, __pyx_L1_error)
29620  __Pyx_GOTREF(__pyx_tuple__76);
29621  __Pyx_GIVEREF(__pyx_tuple__76);
29622 
29623  /* "ADR.pyx":1043
29624  * self.u[0].femSpace.dofMap.l2g,
29625  * self.u[0].dof,
29626  * self.coefficients.sdInfo[(0,0)][0], # <<<<<<<<<<<<<<
29627  * self.coefficients.sdInfo[(0,0)][1],
29628  * self.q[('a',0,0)],
29629  */
29630  __pyx_tuple__77 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1043, __pyx_L1_error)
29631  __Pyx_GOTREF(__pyx_tuple__77);
29632  __Pyx_GIVEREF(__pyx_tuple__77);
29633 
29634  /* "ADR.pyx":1044
29635  * self.u[0].dof,
29636  * self.coefficients.sdInfo[(0,0)][0],
29637  * self.coefficients.sdInfo[(0,0)][1], # <<<<<<<<<<<<<<
29638  * self.q[('a',0,0)],
29639  * self.q[('df',0,0)],
29640  */
29641  __pyx_tuple__78 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 1044, __pyx_L1_error)
29642  __Pyx_GOTREF(__pyx_tuple__78);
29643  __Pyx_GIVEREF(__pyx_tuple__78);
29644 
29645  /* "ADR.pyx":1045
29646  * self.coefficients.sdInfo[(0,0)][0],
29647  * self.coefficients.sdInfo[(0,0)][1],
29648  * self.q[('a',0,0)], # <<<<<<<<<<<<<<
29649  * self.q[('df',0,0)],
29650  * self.q[('r',0)],
29651  */
29652  __pyx_tuple__79 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1045, __pyx_L1_error)
29653  __Pyx_GOTREF(__pyx_tuple__79);
29654  __Pyx_GIVEREF(__pyx_tuple__79);
29655 
29656  /* "ADR.pyx":1046
29657  * self.coefficients.sdInfo[(0,0)][1],
29658  * self.q[('a',0,0)],
29659  * self.q[('df',0,0)], # <<<<<<<<<<<<<<
29660  * self.q[('r',0)],
29661  * self.shockCapturing.lag,
29662  */
29663  __pyx_tuple__80 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 1046, __pyx_L1_error)
29664  __Pyx_GOTREF(__pyx_tuple__80);
29665  __Pyx_GIVEREF(__pyx_tuple__80);
29666 
29667  /* "ADR.pyx":1047
29668  * self.q[('a',0,0)],
29669  * self.q[('df',0,0)],
29670  * self.q[('r',0)], # <<<<<<<<<<<<<<
29671  * self.shockCapturing.lag,
29672  * self.shockCapturing.shockCapturingFactor,
29673  */
29674  __pyx_tuple__81 = PyTuple_Pack(2, __pyx_n_s_r, __pyx_int_0); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1047, __pyx_L1_error)
29675  __Pyx_GOTREF(__pyx_tuple__81);
29676  __Pyx_GIVEREF(__pyx_tuple__81);
29677 
29678  /* "ADR.pyx":1052
29679  * self.shockCapturing.numDiff[0],
29680  * self.shockCapturing.numDiff_last[0],
29681  * self.csrRowIndeces[(0,0)], # <<<<<<<<<<<<<<
29682  * self.csrColumnOffsets[(0,0)],
29683  * jacobian,
29684  */
29685  __pyx_tuple__82 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 1052, __pyx_L1_error)
29686  __Pyx_GOTREF(__pyx_tuple__82);
29687  __Pyx_GIVEREF(__pyx_tuple__82);
29688 
29689  /* "ADR.pyx":1053
29690  * self.shockCapturing.numDiff_last[0],
29691  * self.csrRowIndeces[(0,0)],
29692  * self.csrColumnOffsets[(0,0)], # <<<<<<<<<<<<<<
29693  * jacobian,
29694  * self.mesh.nExteriorElementBoundaries_global,
29695  */
29696  __pyx_tuple__83 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1053, __pyx_L1_error)
29697  __Pyx_GOTREF(__pyx_tuple__83);
29698  __Pyx_GIVEREF(__pyx_tuple__83);
29699 
29700  /* "ADR.pyx":1059
29701  * self.mesh.elementBoundaryElementsArray,
29702  * self.mesh.elementBoundaryLocalElementBoundariesArray,
29703  * self.ebqe[('a',0,0)], # <<<<<<<<<<<<<<
29704  * self.ebqe[('df',0,0)],
29705  * self.numericalFlux.isDOFBoundary[0],
29706  */
29707  __pyx_tuple__84 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 1059, __pyx_L1_error)
29708  __Pyx_GOTREF(__pyx_tuple__84);
29709  __Pyx_GIVEREF(__pyx_tuple__84);
29710 
29711  /* "ADR.pyx":1060
29712  * self.mesh.elementBoundaryLocalElementBoundariesArray,
29713  * self.ebqe[('a',0,0)],
29714  * self.ebqe[('df',0,0)], # <<<<<<<<<<<<<<
29715  * self.numericalFlux.isDOFBoundary[0],
29716  * self.numericalFlux.ebqe[('u',0)],
29717  */
29718  __pyx_tuple__85 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 1060, __pyx_L1_error)
29719  __Pyx_GOTREF(__pyx_tuple__85);
29720  __Pyx_GIVEREF(__pyx_tuple__85);
29721 
29722  /* "ADR.pyx":1062
29723  * self.ebqe[('df',0,0)],
29724  * self.numericalFlux.isDOFBoundary[0],
29725  * self.numericalFlux.ebqe[('u',0)], # <<<<<<<<<<<<<<
29726  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
29727  * self.ebqe[('advectiveFlux_bc_flag',0)],
29728  */
29729  __pyx_tuple__86 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 1062, __pyx_L1_error)
29730  __Pyx_GOTREF(__pyx_tuple__86);
29731  __Pyx_GIVEREF(__pyx_tuple__86);
29732 
29733  /* "ADR.pyx":1063
29734  * self.numericalFlux.isDOFBoundary[0],
29735  * self.numericalFlux.ebqe[('u',0)],
29736  * self.ebqe[('diffusiveFlux_bc_flag',0,0)], # <<<<<<<<<<<<<<
29737  * self.ebqe[('advectiveFlux_bc_flag',0)],
29738  * self.ebqe[('diffusiveFlux_bc',0,0)],
29739  */
29740  __pyx_tuple__87 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc_flag, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 1063, __pyx_L1_error)
29741  __Pyx_GOTREF(__pyx_tuple__87);
29742  __Pyx_GIVEREF(__pyx_tuple__87);
29743 
29744  /* "ADR.pyx":1064
29745  * self.numericalFlux.ebqe[('u',0)],
29746  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
29747  * self.ebqe[('advectiveFlux_bc_flag',0)], # <<<<<<<<<<<<<<
29748  * self.ebqe[('diffusiveFlux_bc',0,0)],
29749  * self.ebqe[('advectiveFlux_bc',0)],
29750  */
29751  __pyx_tuple__88 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc_flag, __pyx_int_0); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1064, __pyx_L1_error)
29752  __Pyx_GOTREF(__pyx_tuple__88);
29753  __Pyx_GIVEREF(__pyx_tuple__88);
29754 
29755  /* "ADR.pyx":1065
29756  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
29757  * self.ebqe[('advectiveFlux_bc_flag',0)],
29758  * self.ebqe[('diffusiveFlux_bc',0,0)], # <<<<<<<<<<<<<<
29759  * self.ebqe[('advectiveFlux_bc',0)],
29760  * self.csrColumnOffsets_eb[(0,0)],
29761  */
29762  __pyx_tuple__89 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 1065, __pyx_L1_error)
29763  __Pyx_GOTREF(__pyx_tuple__89);
29764  __Pyx_GIVEREF(__pyx_tuple__89);
29765 
29766  /* "ADR.pyx":1066
29767  * self.ebqe[('advectiveFlux_bc_flag',0)],
29768  * self.ebqe[('diffusiveFlux_bc',0,0)],
29769  * self.ebqe[('advectiveFlux_bc',0)], # <<<<<<<<<<<<<<
29770  * self.csrColumnOffsets_eb[(0,0)],
29771  * self.ebqe['penalty'],
29772  */
29773  __pyx_tuple__90 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc, __pyx_int_0); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1066, __pyx_L1_error)
29774  __Pyx_GOTREF(__pyx_tuple__90);
29775  __Pyx_GIVEREF(__pyx_tuple__90);
29776 
29777  /* "ADR.pyx":1067
29778  * self.ebqe[('diffusiveFlux_bc',0,0)],
29779  * self.ebqe[('advectiveFlux_bc',0)],
29780  * self.csrColumnOffsets_eb[(0,0)], # <<<<<<<<<<<<<<
29781  * self.ebqe['penalty'],
29782  * self.numericalFlux.boundaryAdjoint_sigma)
29783  */
29784  __pyx_tuple__91 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 1067, __pyx_L1_error)
29785  __Pyx_GOTREF(__pyx_tuple__91);
29786  __Pyx_GIVEREF(__pyx_tuple__91);
29787 
29788  /* "ADR.pyx":1070
29789  * self.ebqe['penalty'],
29790  * self.numericalFlux.boundaryAdjoint_sigma)
29791  * log("Jacobian ",level=10,data=jacobian) # <<<<<<<<<<<<<<
29792  * #mwf decide if this is reasonable for solver statistics
29793  * self.nonlinear_function_jacobian_evaluations += 1
29794  */
29795  __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_s_Jacobian); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 1070, __pyx_L1_error)
29796  __Pyx_GOTREF(__pyx_tuple__92);
29797  __Pyx_GIVEREF(__pyx_tuple__92);
29798 
29799  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218
29800  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
29801  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
29802  * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
29803  *
29804  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
29805  */
29806  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(1, 218, __pyx_L1_error)
29807  __Pyx_GOTREF(__pyx_tuple__93);
29808  __Pyx_GIVEREF(__pyx_tuple__93);
29809 
29810  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222
29811  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
29812  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
29813  * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
29814  *
29815  * info.buf = PyArray_DATA(self)
29816  */
29817  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(1, 222, __pyx_L1_error)
29818  __Pyx_GOTREF(__pyx_tuple__94);
29819  __Pyx_GIVEREF(__pyx_tuple__94);
29820 
29821  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
29822  * if ((descr.byteorder == c'>' and little_endian) or
29823  * (descr.byteorder == c'<' and not little_endian)):
29824  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
29825  * if t == NPY_BYTE: f = "b"
29826  * elif t == NPY_UBYTE: f = "B"
29827  */
29828  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(1, 259, __pyx_L1_error)
29829  __Pyx_GOTREF(__pyx_tuple__95);
29830  __Pyx_GIVEREF(__pyx_tuple__95);
29831 
29832  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799
29833  *
29834  * if (end - f) - <int>(new_offset - offset[0]) < 15:
29835  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
29836  *
29837  * if ((child.byteorder == c'>' and little_endian) or
29838  */
29839  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(1, 799, __pyx_L1_error)
29840  __Pyx_GOTREF(__pyx_tuple__96);
29841  __Pyx_GIVEREF(__pyx_tuple__96);
29842 
29843  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803
29844  * if ((child.byteorder == c'>' and little_endian) or
29845  * (child.byteorder == c'<' and not little_endian)):
29846  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
29847  * # One could encode it in the format string and have Cython
29848  * # complain instead, BUT: < and > in format strings also imply
29849  */
29850  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(1, 803, __pyx_L1_error)
29851  __Pyx_GOTREF(__pyx_tuple__97);
29852  __Pyx_GIVEREF(__pyx_tuple__97);
29853 
29854  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823
29855  * t = child.type_num
29856  * if end - f < 5:
29857  * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
29858  *
29859  * # Until ticket #99 is fixed, use integers to avoid warnings
29860  */
29861  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(1, 823, __pyx_L1_error)
29862  __Pyx_GOTREF(__pyx_tuple__98);
29863  __Pyx_GIVEREF(__pyx_tuple__98);
29864 
29865  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":989
29866  * _import_array()
29867  * except Exception:
29868  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
29869  *
29870  * cdef inline int import_umath() except -1:
29871  */
29872  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(1, 989, __pyx_L1_error)
29873  __Pyx_GOTREF(__pyx_tuple__99);
29874  __Pyx_GIVEREF(__pyx_tuple__99);
29875 
29876  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":995
29877  * _import_umath()
29878  * except Exception:
29879  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
29880  *
29881  * cdef inline int import_ufunc() except -1:
29882  */
29883  __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(1, 995, __pyx_L1_error)
29884  __Pyx_GOTREF(__pyx_tuple__100);
29885  __Pyx_GIVEREF(__pyx_tuple__100);
29886 
29887  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1001
29888  * _import_umath()
29889  * except Exception:
29890  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
29891  */
29892  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(1, 1001, __pyx_L1_error)
29893  __Pyx_GOTREF(__pyx_tuple__101);
29894  __Pyx_GIVEREF(__pyx_tuple__101);
29895 
29896  /* "ADR.pyx":394
29897  * """
29898  *
29899  * def __init__(self,coefficients,nd): # <<<<<<<<<<<<<<
29900  * SGE_base.__init__(self,coefficients,nd,lag=False)
29901  * def initializeElementQuadrature(self,mesh,t,cq):
29902  */
29903  __pyx_tuple__102 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_coefficients, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 394, __pyx_L1_error)
29904  __Pyx_GOTREF(__pyx_tuple__102);
29905  __Pyx_GIVEREF(__pyx_tuple__102);
29906  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 394, __pyx_L1_error)
29907 
29908  /* "ADR.pyx":396
29909  * def __init__(self,coefficients,nd):
29910  * SGE_base.__init__(self,coefficients,nd,lag=False)
29911  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
29912  * pass
29913  * def updateSubgridErrorHistory(self,initializationPhase=False):
29914  */
29915  __pyx_tuple__104 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_mesh, __pyx_n_s_t, __pyx_n_s_cq); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 396, __pyx_L1_error)
29916  __Pyx_GOTREF(__pyx_tuple__104);
29917  __Pyx_GIVEREF(__pyx_tuple__104);
29918  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_initializeElementQuadrature, 396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 396, __pyx_L1_error)
29919 
29920  /* "ADR.pyx":398
29921  * def initializeElementQuadrature(self,mesh,t,cq):
29922  * pass
29923  * def updateSubgridErrorHistory(self,initializationPhase=False): # <<<<<<<<<<<<<<
29924  * pass
29925  * def calculateSubgridError(self,q):
29926  */
29927  __pyx_tuple__106 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_initializationPhase); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 398, __pyx_L1_error)
29928  __Pyx_GOTREF(__pyx_tuple__106);
29929  __Pyx_GIVEREF(__pyx_tuple__106);
29930  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_updateSubgridErrorHistory, 398, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 398, __pyx_L1_error)
29931  __pyx_tuple__108 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 398, __pyx_L1_error)
29932  __Pyx_GOTREF(__pyx_tuple__108);
29933  __Pyx_GIVEREF(__pyx_tuple__108);
29934 
29935  /* "ADR.pyx":400
29936  * def updateSubgridErrorHistory(self,initializationPhase=False):
29937  * pass
29938  * def calculateSubgridError(self,q): # <<<<<<<<<<<<<<
29939  * pass
29940  *
29941  */
29942  __pyx_tuple__109 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_q); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 400, __pyx_L1_error)
29943  __Pyx_GOTREF(__pyx_tuple__109);
29944  __Pyx_GIVEREF(__pyx_tuple__109);
29945  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateSubgridError, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 400, __pyx_L1_error)
29946 
29947  /* "ADR.pyx":410
29948  * :parts: 2
29949  * """
29950  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None): # <<<<<<<<<<<<<<
29951  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
29952  * self.nStepsToDelay = nStepsToDelay
29953  */
29954  __pyx_tuple__111 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_coefficients, __pyx_n_s_nd, __pyx_n_s_shockCapturingFactor, __pyx_n_s_lag, __pyx_n_s_nStepsToDelay); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 410, __pyx_L1_error)
29955  __Pyx_GOTREF(__pyx_tuple__111);
29956  __Pyx_GIVEREF(__pyx_tuple__111);
29957  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 410, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 410, __pyx_L1_error)
29958  __pyx_tuple__113 = PyTuple_Pack(3, ((PyObject*)__pyx_float_0_25), ((PyObject *)Py_True), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 410, __pyx_L1_error)
29959  __Pyx_GOTREF(__pyx_tuple__113);
29960  __Pyx_GIVEREF(__pyx_tuple__113);
29961 
29962  /* "ADR.pyx":418
29963  * self.nStepsToDelay=1
29964  * self.lag=False
29965  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
29966  * self.mesh=mesh
29967  * self.numDiff=[]
29968  */
29969  __pyx_tuple__114 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_mesh, __pyx_n_s_t, __pyx_n_s_cq, __pyx_n_s_ci); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 418, __pyx_L1_error)
29970  __Pyx_GOTREF(__pyx_tuple__114);
29971  __Pyx_GIVEREF(__pyx_tuple__114);
29972  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_initializeElementQuadrature, 418, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 418, __pyx_L1_error)
29973 
29974  /* "ADR.pyx":425
29975  * self.numDiff.append(cq[('numDiff',ci,ci)])
29976  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
29977  * def updateShockCapturingHistory(self): # <<<<<<<<<<<<<<
29978  * self.nSteps += 1
29979  * if self.lag:
29980  */
29981  __pyx_tuple__116 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ci); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 425, __pyx_L1_error)
29982  __Pyx_GOTREF(__pyx_tuple__116);
29983  __Pyx_GIVEREF(__pyx_tuple__116);
29984  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_updateShockCapturingHistory, 425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 425, __pyx_L1_error)
29985 
29986  /* "ADR.pyx":439
29987  *
29988  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
29989  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
29990  * getAdvectiveFluxBoundaryConditions,
29991  * getDiffusiveFluxBoundaryConditions):
29992  */
29993  __pyx_tuple__118 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_vt, __pyx_n_s_getPointwiseBoundaryConditions, __pyx_n_s_getAdvectiveFluxBoundaryConditio, __pyx_n_s_getDiffusiveFluxBoundaryConditio); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 439, __pyx_L1_error)
29994  __Pyx_GOTREF(__pyx_tuple__118);
29995  __Pyx_GIVEREF(__pyx_tuple__118);
29996  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 439, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 439, __pyx_L1_error)
29997 
29998  /* "ADR.pyx":447
29999  *
30000  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
30001  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
30002  * getAdvectiveFluxBoundaryConditions,
30003  * getDiffusiveFluxBoundaryConditions):
30004  */
30005  __pyx_tuple__120 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_vt, __pyx_n_s_getPointwiseBoundaryConditions, __pyx_n_s_getAdvectiveFluxBoundaryConditio, __pyx_n_s_getDiffusiveFluxBoundaryConditio); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 447, __pyx_L1_error)
30006  __Pyx_GOTREF(__pyx_tuple__120);
30007  __Pyx_GIVEREF(__pyx_tuple__120);
30008  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 447, __pyx_L1_error)
30009 
30010  /* "ADR.pyx":455
30011  *
30012  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
30013  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
30014  * getAdvectiveFluxBoundaryConditions,
30015  * getDiffusiveFluxBoundaryConditions):
30016  */
30017  __pyx_tuple__122 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_vt, __pyx_n_s_getPointwiseBoundaryConditions, __pyx_n_s_getAdvectiveFluxBoundaryConditio, __pyx_n_s_getDiffusiveFluxBoundaryConditio); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 455, __pyx_L1_error)
30018  __Pyx_GOTREF(__pyx_tuple__122);
30019  __Pyx_GIVEREF(__pyx_tuple__122);
30020  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 455, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 455, __pyx_L1_error)
30021 
30022  /* "ADR.pyx":472
30023  * """
30024  * from proteus.ctransportCoefficients import L2projectEvaluate
30025  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
30026  * timeVaryingCoefficients=False,
30027  * forceStrongDirichlet=False,
30028  */
30029  __pyx_tuple__124 = PyTuple_Pack(21, __pyx_n_s_self, __pyx_n_s_aOfX, __pyx_n_s_fOfX, __pyx_n_s_velocity, __pyx_n_s_nc, __pyx_n_s_nd, __pyx_n_s_l2proj, __pyx_n_s_timeVaryingCoefficients, __pyx_n_s_forceStrongDirichlet, __pyx_n_s_useMetrics, __pyx_n_s_sc_uref, __pyx_n_s_sc_beta, __pyx_n_s_mass, __pyx_n_s_advection, __pyx_n_s_diffusion, __pyx_n_s_potential, __pyx_n_s_reaction, __pyx_n_s_hamiltonian, __pyx_n_s_i, __pyx_n_s_sdInfo, __pyx_n_s_row); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 472, __pyx_L1_error)
30030  __Pyx_GOTREF(__pyx_tuple__124);
30031  __Pyx_GIVEREF(__pyx_tuple__124);
30032  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(12, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 472, __pyx_L1_error)
30033  __pyx_tuple__126 = PyTuple_Pack(9, ((PyObject *)Py_None), ((PyObject *)__pyx_int_1), ((PyObject *)__pyx_int_2), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject *)Py_False), ((PyObject*)__pyx_float_0_0), ((PyObject*)__pyx_float_1_0), ((PyObject*)__pyx_float_1_0)); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 472, __pyx_L1_error)
30034  __Pyx_GOTREF(__pyx_tuple__126);
30035  __Pyx_GIVEREF(__pyx_tuple__126);
30036 
30037  /* "ADR.pyx":514
30038  * useSparseDiffusion=True,
30039  * movingDomain=False)
30040  * def initializeElementQuadrature(self,t,cq): # <<<<<<<<<<<<<<
30041  * nd = self.nd
30042  * for ci in range(self.nc):
30043  */
30044  __pyx_tuple__127 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_cq, __pyx_n_s_nd, __pyx_n_s_ci, __pyx_n_s_i); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 514, __pyx_L1_error)
30045  __Pyx_GOTREF(__pyx_tuple__127);
30046  __Pyx_GIVEREF(__pyx_tuple__127);
30047  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_initializeElementQuadrature, 514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 514, __pyx_L1_error)
30048 
30049  /* "ADR.pyx":525
30050  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
30051  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
30052  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global): # <<<<<<<<<<<<<<
30053  * nd = self.nd
30054  * for c in [cebq,cebq_global]:
30055  */
30056  __pyx_tuple__129 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_cebq, __pyx_n_s_cebq_global, __pyx_n_s_nd, __pyx_n_s_c, __pyx_n_s_ci, __pyx_n_s_i); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 525, __pyx_L1_error)
30057  __Pyx_GOTREF(__pyx_tuple__129);
30058  __Pyx_GIVEREF(__pyx_tuple__129);
30059  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_initializeElementBoundaryQuadrat, 525, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 525, __pyx_L1_error)
30060 
30061  /* "ADR.pyx":538
30062  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
30063  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
30064  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe): # <<<<<<<<<<<<<<
30065  * nd = self.nd
30066  * for c in [cebqe]:
30067  */
30068  __pyx_tuple__131 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_cebqe, __pyx_n_s_nd, __pyx_n_s_c, __pyx_n_s_ci, __pyx_n_s_i); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 538, __pyx_L1_error)
30069  __Pyx_GOTREF(__pyx_tuple__131);
30070  __Pyx_GIVEREF(__pyx_tuple__131);
30071  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_initializeGlobalExteriorElementB, 538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 538, __pyx_L1_error)
30072 
30073  /* "ADR.pyx":551
30074  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
30075  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
30076  * def evaluate(self,t,c): # <<<<<<<<<<<<<<
30077  * if self.timeVaryingCoefficients:
30078  * nd = self.nd
30079  */
30080  __pyx_tuple__133 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_c, __pyx_n_s_nd, __pyx_n_s_ci, __pyx_n_s_i); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 551, __pyx_L1_error)
30081  __Pyx_GOTREF(__pyx_tuple__133);
30082  __Pyx_GIVEREF(__pyx_tuple__133);
30083  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_evaluate, 551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 551, __pyx_L1_error)
30084 
30085  /* "ADR.pyx":571
30086  * """
30087  * nCalls=0
30088  * def __init__(self, # <<<<<<<<<<<<<<
30089  * uDict,
30090  * phiDict,
30091  */
30092  __pyx_tuple__135 = PyTuple_Pack(56, __pyx_n_s_self, __pyx_n_s_uDict, __pyx_n_s_phiDict, __pyx_n_s_testSpaceDict, __pyx_n_s_matType, __pyx_n_s_dofBoundaryConditionsDict, __pyx_n_s_dofBoundaryConditionsSetterDict, __pyx_n_s_coefficients, __pyx_n_s_elementQuadrature, __pyx_n_s_elementBoundaryQuadrature, __pyx_n_s_fluxBoundaryConditionsDict, __pyx_n_s_advectiveFluxBoundaryConditionsS, __pyx_n_s_diffusiveFluxBoundaryConditionsS, __pyx_n_s_stressTraceBoundaryConditionsSet, __pyx_n_s_stabilization, __pyx_n_s_shockCapturing, __pyx_n_s_conservativeFluxDict, __pyx_n_s_numericalFluxType, __pyx_n_s_TimeIntegrationClass, __pyx_n_s_massLumping, __pyx_n_s_reactionLumping, __pyx_n_s_options, __pyx_n_s_name, __pyx_n_s_reuse_trial_and_test_quadrature, __pyx_n_s_sd, __pyx_n_s_movingDomain, __pyx_n_s_Comm, __pyx_n_s_ci, __pyx_n_s_flag, __pyx_n_s_diffusionDict, __pyx_n_s_elementQuadratureDict, __pyx_n_s_elemQuadIsDict, __pyx_n_s_I, __pyx_n_s_elementBoundaryQuadratureDict, __pyx_n_s_cj, __pyx_n_s_ebNE, __pyx_n_s_ebN, __pyx_n_s_eN_global, __pyx_n_s_ebN_element, __pyx_n_s_i, __pyx_n_s_nI, __pyx_n_s_n, __pyx_n_s_comm, __pyx_n_s_k, __pyx_n_s_PostProcessingTools, __pyx_n_s_Archiver, __pyx_n_s_fbcObject, __pyx_n_s_t, __pyx_n_s_g, __pyx_n_s_ck, __pyx_n_s_diffusiveFluxBoundaryConditionsD_2, __pyx_n_s_compKernelFlag, __pyx_n_s_u_j, __pyx_n_s_phi_k, __pyx_n_s_femSpace, __pyx_n_s_dc); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 571, __pyx_L1_error)
30093  __Pyx_GOTREF(__pyx_tuple__135);
30094  __Pyx_GIVEREF(__pyx_tuple__135);
30095  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(26, 0, 56, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 571, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 571, __pyx_L1_error)
30096  __pyx_tuple__137 = PyTuple_Pack(16, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject *)Py_False), ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_defaultName), ((PyObject *)Py_True), ((PyObject *)Py_True), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 571, __pyx_L1_error)
30097  __Pyx_GOTREF(__pyx_tuple__137);
30098  __Pyx_GIVEREF(__pyx_tuple__137);
30099 
30100  /* "ADR.pyx":934
30101  * compKernelFlag)
30102  * #mwf these are getting called by redistancing classes,
30103  * def calculateCoefficients(self): # <<<<<<<<<<<<<<
30104  * pass
30105  * def getResidual(self,u,r):
30106  */
30107  __pyx_tuple__138 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 934, __pyx_L1_error)
30108  __Pyx_GOTREF(__pyx_tuple__138);
30109  __Pyx_GIVEREF(__pyx_tuple__138);
30110  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateCoefficients, 934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 934, __pyx_L1_error)
30111 
30112  /* "ADR.pyx":936
30113  * def calculateCoefficients(self):
30114  * pass
30115  * def getResidual(self,u,r): # <<<<<<<<<<<<<<
30116  * import pdb
30117  * import copy
30118  */
30119  __pyx_tuple__140 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_u, __pyx_n_s_r, __pyx_n_s_pdb, __pyx_n_s_copy, __pyx_n_s_globalSum); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 936, __pyx_L1_error)
30120  __Pyx_GOTREF(__pyx_tuple__140);
30121  __Pyx_GIVEREF(__pyx_tuple__140);
30122  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_getResidual, 936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 936, __pyx_L1_error)
30123 
30124  /* "ADR.pyx":1009
30125  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
30126  * self.nonlinear_function_evaluations += 1
30127  * def getJacobian(self,jacobian): # <<<<<<<<<<<<<<
30128  * #import superluWrappers
30129  * #import numpy
30130  */
30131  __pyx_tuple__142 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_jacobian, __pyx_n_s_pdb); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 1009, __pyx_L1_error)
30132  __Pyx_GOTREF(__pyx_tuple__142);
30133  __Pyx_GIVEREF(__pyx_tuple__142);
30134  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_getJacobian, 1009, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 1009, __pyx_L1_error)
30135 
30136  /* "ADR.pyx":1074
30137  * self.nonlinear_function_jacobian_evaluations += 1
30138  * return jacobian
30139  * def calculateElementQuadrature(self): # <<<<<<<<<<<<<<
30140  * """
30141  * Calculate the physical location and weights of the quadrature rules
30142  */
30143  __pyx_tuple__144 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 1074, __pyx_L1_error)
30144  __Pyx_GOTREF(__pyx_tuple__144);
30145  __Pyx_GIVEREF(__pyx_tuple__144);
30146  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateElementQuadrature, 1074, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 1074, __pyx_L1_error)
30147 
30148  /* "ADR.pyx":1093
30149  * if self.shockCapturing is not None:
30150  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
30151  * def calculateElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
30152  * pass
30153  * def calculateExteriorElementBoundaryQuadrature(self):
30154  */
30155  __pyx_tuple__146 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 1093, __pyx_L1_error)
30156  __Pyx_GOTREF(__pyx_tuple__146);
30157  __Pyx_GIVEREF(__pyx_tuple__146);
30158  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateElementBoundaryQuadratu, 1093, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 1093, __pyx_L1_error)
30159 
30160  /* "ADR.pyx":1095
30161  * def calculateElementBoundaryQuadrature(self):
30162  * pass
30163  * def calculateExteriorElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
30164  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
30165  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
30166  */
30167  __pyx_tuple__148 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_cj); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 1095, __pyx_L1_error)
30168  __Pyx_GOTREF(__pyx_tuple__148);
30169  __Pyx_GIVEREF(__pyx_tuple__148);
30170  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateExteriorElementBoundary, 1095, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 1095, __pyx_L1_error)
30171 
30172  /* "ADR.pyx":1109
30173  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
30174  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
30175  * def estimate_mt(self): # <<<<<<<<<<<<<<
30176  * pass
30177  * def calculateAuxiliaryQuantitiesAfterStep(self):
30178  */
30179  __pyx_tuple__150 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 1109, __pyx_L1_error)
30180  __Pyx_GOTREF(__pyx_tuple__150);
30181  __Pyx_GIVEREF(__pyx_tuple__150);
30182  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_estimate_mt, 1109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 1109, __pyx_L1_error)
30183 
30184  /* "ADR.pyx":1111
30185  * def estimate_mt(self):
30186  * pass
30187  * def calculateAuxiliaryQuantitiesAfterStep(self): # <<<<<<<<<<<<<<
30188  * pass
30189  * def calculateSolutionAtQuadrature(self):
30190  */
30191  __pyx_tuple__152 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 1111, __pyx_L1_error)
30192  __Pyx_GOTREF(__pyx_tuple__152);
30193  __Pyx_GIVEREF(__pyx_tuple__152);
30194  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateAuxiliaryQuantitiesAfte, 1111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 1111, __pyx_L1_error)
30195 
30196  /* "ADR.pyx":1113
30197  * def calculateAuxiliaryQuantitiesAfterStep(self):
30198  * pass
30199  * def calculateSolutionAtQuadrature(self): # <<<<<<<<<<<<<<
30200  * pass
30201  */
30202  __pyx_tuple__154 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 1113, __pyx_L1_error)
30203  __Pyx_GOTREF(__pyx_tuple__154);
30204  __Pyx_GIVEREF(__pyx_tuple__154);
30205  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateSolutionAtQuadrature, 1113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 1113, __pyx_L1_error)
30206  __Pyx_RefNannyFinishContext();
30207  return 0;
30208  __pyx_L1_error:;
30209  __Pyx_RefNannyFinishContext();
30210  return -1;
30211 }
30212 
30213 static int __Pyx_InitGlobals(void) {
30214  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
30215  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
30216  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
30217  __pyx_float_0_25 = PyFloat_FromDouble(0.25); if (unlikely(!__pyx_float_0_25)) __PYX_ERR(0, 1, __pyx_L1_error)
30218  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
30219  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
30220  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
30221  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
30222  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
30223  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
30224  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
30225  __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error)
30226  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
30227  return 0;
30228  __pyx_L1_error:;
30229  return -1;
30230 }
30231 
30232 #if PY_MAJOR_VERSION < 3
30233 PyMODINIT_FUNC initADR(void); /*proto*/
30234 PyMODINIT_FUNC initADR(void)
30235 #else
30236 PyMODINIT_FUNC PyInit_ADR(void); /*proto*/
30237 PyMODINIT_FUNC PyInit_ADR(void)
30238 #endif
30239 {
30240  PyObject *__pyx_t_1 = NULL;
30241  PyObject *__pyx_t_2 = NULL;
30242  PyObject *__pyx_t_3 = NULL;
30243  PyObject *__pyx_t_4 = NULL;
30244  PyObject *__pyx_t_5 = NULL;
30245  __Pyx_RefNannyDeclarations
30246  #if CYTHON_REFNANNY
30247  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
30248  if (!__Pyx_RefNanny) {
30249  PyErr_Clear();
30250  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
30251  if (!__Pyx_RefNanny)
30252  Py_FatalError("failed to import 'refnanny' module");
30253  }
30254  #endif
30255  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_ADR(void)", 0);
30256  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30257  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
30258  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
30259  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
30260  #ifdef __Pyx_CyFunction_USED
30261  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30262  #endif
30263  #ifdef __Pyx_FusedFunction_USED
30264  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30265  #endif
30266  #ifdef __Pyx_Coroutine_USED
30267  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30268  #endif
30269  #ifdef __Pyx_Generator_USED
30270  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30271  #endif
30272  #ifdef __Pyx_StopAsyncIteration_USED
30273  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30274  #endif
30275  /*--- Library function declarations ---*/
30276  /*--- Threads initialization code ---*/
30277  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
30278  #ifdef WITH_THREAD /* Python build with threading support? */
30279  PyEval_InitThreads();
30280  #endif
30281  #endif
30282  /*--- Module creation code ---*/
30283  #if PY_MAJOR_VERSION < 3
30284  __pyx_m = Py_InitModule4("ADR", __pyx_methods, __pyx_k_An_optimized_Advection_Diffusio, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
30285  #else
30286  __pyx_m = PyModule_Create(&__pyx_moduledef);
30287  #endif
30288  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
30289  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
30290  Py_INCREF(__pyx_d);
30291  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
30292  #if CYTHON_COMPILING_IN_PYPY
30293  Py_INCREF(__pyx_b);
30294  #endif
30295  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
30296  /*--- Initialize various global constants etc. ---*/
30297  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30298  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
30299  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30300  #endif
30301  if (__pyx_module_is_main_ADR) {
30302  if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30303  }
30304  #if PY_MAJOR_VERSION >= 3
30305  {
30306  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
30307  if (!PyDict_GetItemString(modules, "ADR")) {
30308  if (unlikely(PyDict_SetItemString(modules, "ADR", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
30309  }
30310  }
30311  #endif
30312  /*--- Builtin init code ---*/
30313  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30314  /*--- Constants init code ---*/
30315  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30316  /*--- Global init code ---*/
30317  /*--- Variable export code ---*/
30318  /*--- Function export code ---*/
30319  /*--- Type init code ---*/
30320  if (PyType_Ready(&__pyx_type_3ADR_ADR) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
30321  __pyx_type_3ADR_ADR.tp_print = 0;
30322  if (PyObject_SetAttrString(__pyx_m, "ADR", (PyObject *)&__pyx_type_3ADR_ADR) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
30323  __pyx_ptype_3ADR_ADR = &__pyx_type_3ADR_ADR;
30324  /*--- Type import code ---*/
30325  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type",
30326  #if CYTHON_COMPILING_IN_PYPY
30327  sizeof(PyTypeObject),
30328  #else
30329  sizeof(PyHeapTypeObject),
30330  #endif
30331  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(2, 9, __pyx_L1_error)
30332  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) __PYX_ERR(1, 155, __pyx_L1_error)
30333  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) __PYX_ERR(1, 168, __pyx_L1_error)
30334  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) __PYX_ERR(1, 172, __pyx_L1_error)
30335  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) __PYX_ERR(1, 181, __pyx_L1_error)
30336  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) __PYX_ERR(1, 861, __pyx_L1_error)
30337  /*--- Variable import code ---*/
30338  /*--- Function import code ---*/
30339  /*--- Execution code ---*/
30340  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
30341  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30342  #endif
30343 
30344  /* "ADR.pyx":6
30345  * """
30346  *
30347  * import numpy # <<<<<<<<<<<<<<
30348  * cimport numpy
30349  * from math import fabs
30350  */
30351  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
30352  __Pyx_GOTREF(__pyx_t_1);
30353  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
30354  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30355 
30356  /* "ADR.pyx":8
30357  * import numpy
30358  * cimport numpy
30359  * from math import fabs # <<<<<<<<<<<<<<
30360  * import proteus
30361  * from proteus import cfemIntegrals, Quadrature
30362  */
30363  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
30364  __Pyx_GOTREF(__pyx_t_1);
30365  __Pyx_INCREF(__pyx_n_s_fabs);
30366  __Pyx_GIVEREF(__pyx_n_s_fabs);
30367  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_fabs);
30368  __pyx_t_2 = __Pyx_Import(__pyx_n_s_math, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
30369  __Pyx_GOTREF(__pyx_t_2);
30370  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30371  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_fabs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
30372  __Pyx_GOTREF(__pyx_t_1);
30373  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fabs, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
30374  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30375  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30376 
30377  /* "ADR.pyx":9
30378  * cimport numpy
30379  * from math import fabs
30380  * import proteus # <<<<<<<<<<<<<<
30381  * from proteus import cfemIntegrals, Quadrature
30382  * from proteus.NonlinearSolvers import NonlinearEquation
30383  */
30384  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error)
30385  __Pyx_GOTREF(__pyx_t_2);
30386  if (PyDict_SetItem(__pyx_d, __pyx_n_s_proteus, __pyx_t_2) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
30387  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30388 
30389  /* "ADR.pyx":10
30390  * from math import fabs
30391  * import proteus
30392  * from proteus import cfemIntegrals, Quadrature # <<<<<<<<<<<<<<
30393  * from proteus.NonlinearSolvers import NonlinearEquation
30394  * from proteus.FemTools import (DOFBoundaryConditions,
30395  */
30396  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
30397  __Pyx_GOTREF(__pyx_t_2);
30398  __Pyx_INCREF(__pyx_n_s_cfemIntegrals);
30399  __Pyx_GIVEREF(__pyx_n_s_cfemIntegrals);
30400  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_cfemIntegrals);
30401  __Pyx_INCREF(__pyx_n_s_Quadrature);
30402  __Pyx_GIVEREF(__pyx_n_s_Quadrature);
30403  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Quadrature);
30404  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
30405  __Pyx_GOTREF(__pyx_t_1);
30406  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30407  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
30408  __Pyx_GOTREF(__pyx_t_2);
30409  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cfemIntegrals, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
30410  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30411  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Quadrature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
30412  __Pyx_GOTREF(__pyx_t_2);
30413  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Quadrature, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
30414  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30415  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30416 
30417  /* "ADR.pyx":11
30418  * import proteus
30419  * from proteus import cfemIntegrals, Quadrature
30420  * from proteus.NonlinearSolvers import NonlinearEquation # <<<<<<<<<<<<<<
30421  * from proteus.FemTools import (DOFBoundaryConditions,
30422  * FluxBoundaryConditions,
30423  */
30424  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
30425  __Pyx_GOTREF(__pyx_t_1);
30426  __Pyx_INCREF(__pyx_n_s_NonlinearEquation);
30427  __Pyx_GIVEREF(__pyx_n_s_NonlinearEquation);
30428  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_NonlinearEquation);
30429  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_NonlinearSolvers, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)
30430  __Pyx_GOTREF(__pyx_t_2);
30431  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30432  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NonlinearEquation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
30433  __Pyx_GOTREF(__pyx_t_1);
30434  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NonlinearEquation, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
30435  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30436  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30437 
30438  /* "ADR.pyx":12
30439  * from proteus import cfemIntegrals, Quadrature
30440  * from proteus.NonlinearSolvers import NonlinearEquation
30441  * from proteus.FemTools import (DOFBoundaryConditions, # <<<<<<<<<<<<<<
30442  * FluxBoundaryConditions,
30443  * C0_AffineLinearOnSimplexWithNodalBasis)
30444  */
30445  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
30446  __Pyx_GOTREF(__pyx_t_2);
30447  __Pyx_INCREF(__pyx_n_s_DOFBoundaryConditions);
30448  __Pyx_GIVEREF(__pyx_n_s_DOFBoundaryConditions);
30449  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_DOFBoundaryConditions);
30450  __Pyx_INCREF(__pyx_n_s_FluxBoundaryConditions);
30451  __Pyx_GIVEREF(__pyx_n_s_FluxBoundaryConditions);
30452  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_FluxBoundaryConditions);
30453  __Pyx_INCREF(__pyx_n_s_C0_AffineLinearOnSimplexWithNoda);
30454  __Pyx_GIVEREF(__pyx_n_s_C0_AffineLinearOnSimplexWithNoda);
30455  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_C0_AffineLinearOnSimplexWithNoda);
30456  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_FemTools, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
30457  __Pyx_GOTREF(__pyx_t_1);
30458  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30459  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_DOFBoundaryConditions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
30460  __Pyx_GOTREF(__pyx_t_2);
30461  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DOFBoundaryConditions, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
30462  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30463  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_FluxBoundaryConditions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
30464  __Pyx_GOTREF(__pyx_t_2);
30465  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FluxBoundaryConditions, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
30466  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30467  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_C0_AffineLinearOnSimplexWithNoda); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
30468  __Pyx_GOTREF(__pyx_t_2);
30469  if (PyDict_SetItem(__pyx_d, __pyx_n_s_C0_AffineLinearOnSimplexWithNoda, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
30470  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30471  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30472 
30473  /* "ADR.pyx":15
30474  * FluxBoundaryConditions,
30475  * C0_AffineLinearOnSimplexWithNodalBasis)
30476  * from proteus.flcbdfWrappers import globalMax # <<<<<<<<<<<<<<
30477  * from proteus.Profiling import memory
30478  * from proteus.Profiling import logEvent as log
30479  */
30480  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
30481  __Pyx_GOTREF(__pyx_t_1);
30482  __Pyx_INCREF(__pyx_n_s_globalMax);
30483  __Pyx_GIVEREF(__pyx_n_s_globalMax);
30484  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_globalMax);
30485  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_flcbdfWrappers, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
30486  __Pyx_GOTREF(__pyx_t_2);
30487  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30488  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_globalMax); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
30489  __Pyx_GOTREF(__pyx_t_1);
30490  if (PyDict_SetItem(__pyx_d, __pyx_n_s_globalMax, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
30491  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30492  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30493 
30494  /* "ADR.pyx":16
30495  * C0_AffineLinearOnSimplexWithNodalBasis)
30496  * from proteus.flcbdfWrappers import globalMax
30497  * from proteus.Profiling import memory # <<<<<<<<<<<<<<
30498  * from proteus.Profiling import logEvent as log
30499  * from proteus.Transport import OneLevelTransport
30500  */
30501  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
30502  __Pyx_GOTREF(__pyx_t_2);
30503  __Pyx_INCREF(__pyx_n_s_memory);
30504  __Pyx_GIVEREF(__pyx_n_s_memory);
30505  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_memory);
30506  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_Profiling, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
30507  __Pyx_GOTREF(__pyx_t_1);
30508  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30509  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_memory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
30510  __Pyx_GOTREF(__pyx_t_2);
30511  if (PyDict_SetItem(__pyx_d, __pyx_n_s_memory, __pyx_t_2) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
30512  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30513  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30514 
30515  /* "ADR.pyx":17
30516  * from proteus.flcbdfWrappers import globalMax
30517  * from proteus.Profiling import memory
30518  * from proteus.Profiling import logEvent as log # <<<<<<<<<<<<<<
30519  * from proteus.Transport import OneLevelTransport
30520  * from proteus.TransportCoefficients import TC_base
30521  */
30522  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
30523  __Pyx_GOTREF(__pyx_t_1);
30524  __Pyx_INCREF(__pyx_n_s_logEvent);
30525  __Pyx_GIVEREF(__pyx_n_s_logEvent);
30526  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_logEvent);
30527  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_Profiling, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
30528  __Pyx_GOTREF(__pyx_t_2);
30529  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30530  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
30531  __Pyx_GOTREF(__pyx_t_1);
30532  if (PyDict_SetItem(__pyx_d, __pyx_n_s_log, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
30533  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30534  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30535 
30536  /* "ADR.pyx":18
30537  * from proteus.Profiling import memory
30538  * from proteus.Profiling import logEvent as log
30539  * from proteus.Transport import OneLevelTransport # <<<<<<<<<<<<<<
30540  * from proteus.TransportCoefficients import TC_base
30541  * from proteus.SubgridError import SGE_base
30542  */
30543  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
30544  __Pyx_GOTREF(__pyx_t_2);
30545  __Pyx_INCREF(__pyx_n_s_OneLevelTransport);
30546  __Pyx_GIVEREF(__pyx_n_s_OneLevelTransport);
30547  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_OneLevelTransport);
30548  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_Transport, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
30549  __Pyx_GOTREF(__pyx_t_1);
30550  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30551  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
30552  __Pyx_GOTREF(__pyx_t_2);
30553  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneLevelTransport, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
30554  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30555  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30556 
30557  /* "ADR.pyx":19
30558  * from proteus.Profiling import logEvent as log
30559  * from proteus.Transport import OneLevelTransport
30560  * from proteus.TransportCoefficients import TC_base # <<<<<<<<<<<<<<
30561  * from proteus.SubgridError import SGE_base
30562  * from proteus.ShockCapturing import ShockCapturing_base
30563  */
30564  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
30565  __Pyx_GOTREF(__pyx_t_1);
30566  __Pyx_INCREF(__pyx_n_s_TC_base);
30567  __Pyx_GIVEREF(__pyx_n_s_TC_base);
30568  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_TC_base);
30569  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_TransportCoefficients, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
30570  __Pyx_GOTREF(__pyx_t_2);
30571  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30572  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_TC_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
30573  __Pyx_GOTREF(__pyx_t_1);
30574  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TC_base, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
30575  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30576  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30577 
30578  /* "ADR.pyx":20
30579  * from proteus.Transport import OneLevelTransport
30580  * from proteus.TransportCoefficients import TC_base
30581  * from proteus.SubgridError import SGE_base # <<<<<<<<<<<<<<
30582  * from proteus.ShockCapturing import ShockCapturing_base
30583  *
30584  */
30585  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
30586  __Pyx_GOTREF(__pyx_t_2);
30587  __Pyx_INCREF(__pyx_n_s_SGE_base);
30588  __Pyx_GIVEREF(__pyx_n_s_SGE_base);
30589  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SGE_base);
30590  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_SubgridError, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
30591  __Pyx_GOTREF(__pyx_t_1);
30592  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30593  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SGE_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
30594  __Pyx_GOTREF(__pyx_t_2);
30595  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SGE_base, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
30596  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30597  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30598 
30599  /* "ADR.pyx":21
30600  * from proteus.TransportCoefficients import TC_base
30601  * from proteus.SubgridError import SGE_base
30602  * from proteus.ShockCapturing import ShockCapturing_base # <<<<<<<<<<<<<<
30603  *
30604  * cdef extern from "ADR.h" namespace "proteus":
30605  */
30606  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
30607  __Pyx_GOTREF(__pyx_t_1);
30608  __Pyx_INCREF(__pyx_n_s_ShockCapturing_base);
30609  __Pyx_GIVEREF(__pyx_n_s_ShockCapturing_base);
30610  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ShockCapturing_base);
30611  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_ShockCapturing, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
30612  __Pyx_GOTREF(__pyx_t_2);
30613  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30614  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ShockCapturing_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
30615  __Pyx_GOTREF(__pyx_t_1);
30616  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ShockCapturing_base, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
30617  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30618  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30619 
30620  /* "ADR.pyx":386
30621  *
30622  *
30623  * class SubgridError(SGE_base): # <<<<<<<<<<<<<<
30624  * """
30625  * SubgridError approximation for ADR equations
30626  */
30627  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SGE_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
30628  __Pyx_GOTREF(__pyx_t_2);
30629  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
30630  __Pyx_GOTREF(__pyx_t_1);
30631  __Pyx_GIVEREF(__pyx_t_2);
30632  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
30633  __pyx_t_2 = 0;
30634  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
30635  __Pyx_GOTREF(__pyx_t_2);
30636  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SubgridError, __pyx_n_s_SubgridError, (PyObject *) NULL, __pyx_n_s_ADR, __pyx_kp_s_SubgridError_approximation_for); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error)
30637  __Pyx_GOTREF(__pyx_t_3);
30638 
30639  /* "ADR.pyx":394
30640  * """
30641  *
30642  * def __init__(self,coefficients,nd): # <<<<<<<<<<<<<<
30643  * SGE_base.__init__(self,coefficients,nd,lag=False)
30644  * def initializeElementQuadrature(self,mesh,t,cq):
30645  */
30646  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12SubgridError_1__init__, 0, __pyx_n_s_SubgridError___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error)
30647  __Pyx_GOTREF(__pyx_t_4);
30648  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
30649  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30650 
30651  /* "ADR.pyx":396
30652  * def __init__(self,coefficients,nd):
30653  * SGE_base.__init__(self,coefficients,nd,lag=False)
30654  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
30655  * pass
30656  * def updateSubgridErrorHistory(self,initializationPhase=False):
30657  */
30658  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12SubgridError_3initializeElementQuadrature, 0, __pyx_n_s_SubgridError_initializeElementQu, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 396, __pyx_L1_error)
30659  __Pyx_GOTREF(__pyx_t_4);
30660  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_initializeElementQuadrature, __pyx_t_4) < 0) __PYX_ERR(0, 396, __pyx_L1_error)
30661  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30662 
30663  /* "ADR.pyx":398
30664  * def initializeElementQuadrature(self,mesh,t,cq):
30665  * pass
30666  * def updateSubgridErrorHistory(self,initializationPhase=False): # <<<<<<<<<<<<<<
30667  * pass
30668  * def calculateSubgridError(self,q):
30669  */
30670  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12SubgridError_5updateSubgridErrorHistory, 0, __pyx_n_s_SubgridError_updateSubgridErrorH, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error)
30671  __Pyx_GOTREF(__pyx_t_4);
30672  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__108);
30673  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_updateSubgridErrorHistory, __pyx_t_4) < 0) __PYX_ERR(0, 398, __pyx_L1_error)
30674  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30675 
30676  /* "ADR.pyx":400
30677  * def updateSubgridErrorHistory(self,initializationPhase=False):
30678  * pass
30679  * def calculateSubgridError(self,q): # <<<<<<<<<<<<<<
30680  * pass
30681  *
30682  */
30683  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12SubgridError_7calculateSubgridError, 0, __pyx_n_s_SubgridError_calculateSubgridErr, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L1_error)
30684  __Pyx_GOTREF(__pyx_t_4);
30685  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateSubgridError, __pyx_t_4) < 0) __PYX_ERR(0, 400, __pyx_L1_error)
30686  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30687 
30688  /* "ADR.pyx":386
30689  *
30690  *
30691  * class SubgridError(SGE_base): # <<<<<<<<<<<<<<
30692  * """
30693  * SubgridError approximation for ADR equations
30694  */
30695  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SubgridError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error)
30696  __Pyx_GOTREF(__pyx_t_4);
30697  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SubgridError, __pyx_t_4) < 0) __PYX_ERR(0, 386, __pyx_L1_error)
30698  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30699  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30700  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30701  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30702 
30703  /* "ADR.pyx":403
30704  * pass
30705  *
30706  * class ShockCapturing(ShockCapturing_base): # <<<<<<<<<<<<<<
30707  * """
30708  * Residual-based shock capturing for ADR equations
30709  */
30710  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ShockCapturing_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error)
30711  __Pyx_GOTREF(__pyx_t_1);
30712  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
30713  __Pyx_GOTREF(__pyx_t_2);
30714  __Pyx_GIVEREF(__pyx_t_1);
30715  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
30716  __pyx_t_1 = 0;
30717  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error)
30718  __Pyx_GOTREF(__pyx_t_1);
30719  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ShockCapturing, __pyx_n_s_ShockCapturing, (PyObject *) NULL, __pyx_n_s_ADR, __pyx_kp_s_Residual_based_shock_capturing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
30720  __Pyx_GOTREF(__pyx_t_3);
30721 
30722  /* "ADR.pyx":410
30723  * :parts: 2
30724  * """
30725  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None): # <<<<<<<<<<<<<<
30726  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
30727  * self.nStepsToDelay = nStepsToDelay
30728  */
30729  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_14ShockCapturing_1__init__, 0, __pyx_n_s_ShockCapturing___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 410, __pyx_L1_error)
30730  __Pyx_GOTREF(__pyx_t_4);
30731  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__113);
30732  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 410, __pyx_L1_error)
30733  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30734 
30735  /* "ADR.pyx":418
30736  * self.nStepsToDelay=1
30737  * self.lag=False
30738  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
30739  * self.mesh=mesh
30740  * self.numDiff=[]
30741  */
30742  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_14ShockCapturing_3initializeElementQuadrature, 0, __pyx_n_s_ShockCapturing_initializeElement, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
30743  __Pyx_GOTREF(__pyx_t_4);
30744  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_initializeElementQuadrature, __pyx_t_4) < 0) __PYX_ERR(0, 418, __pyx_L1_error)
30745  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30746 
30747  /* "ADR.pyx":425
30748  * self.numDiff.append(cq[('numDiff',ci,ci)])
30749  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
30750  * def updateShockCapturingHistory(self): # <<<<<<<<<<<<<<
30751  * self.nSteps += 1
30752  * if self.lag:
30753  */
30754  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_14ShockCapturing_5updateShockCapturingHistory, 0, __pyx_n_s_ShockCapturing_updateShockCaptur, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
30755  __Pyx_GOTREF(__pyx_t_4);
30756  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_updateShockCapturingHistory, __pyx_t_4) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
30757  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30758 
30759  /* "ADR.pyx":403
30760  * pass
30761  *
30762  * class ShockCapturing(ShockCapturing_base): # <<<<<<<<<<<<<<
30763  * """
30764  * Residual-based shock capturing for ADR equations
30765  */
30766  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ShockCapturing, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error)
30767  __Pyx_GOTREF(__pyx_t_4);
30768  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ShockCapturing, __pyx_t_4) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
30769  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30770  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30771  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30772  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30773 
30774  /* "ADR.pyx":438
30775  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
30776  *
30777  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior): # <<<<<<<<<<<<<<
30778  * def __init__(self,vt,getPointwiseBoundaryConditions,
30779  * getAdvectiveFluxBoundaryConditions,
30780  */
30781  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error)
30782  __Pyx_GOTREF(__pyx_t_2);
30783  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
30784  __Pyx_GOTREF(__pyx_t_1);
30785  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30786  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Advection_DiagonalUpwind_Diffusi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error)
30787  __Pyx_GOTREF(__pyx_t_2);
30788  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30789  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
30790  __Pyx_GOTREF(__pyx_t_1);
30791  __Pyx_GIVEREF(__pyx_t_2);
30792  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
30793  __pyx_t_2 = 0;
30794  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error)
30795  __Pyx_GOTREF(__pyx_t_2);
30796  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_NumericalFlux_IIPG, __pyx_n_s_NumericalFlux_IIPG, (PyObject *) NULL, __pyx_n_s_ADR, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 438, __pyx_L1_error)
30797  __Pyx_GOTREF(__pyx_t_3);
30798 
30799  /* "ADR.pyx":439
30800  *
30801  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
30802  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
30803  * getAdvectiveFluxBoundaryConditions,
30804  * getDiffusiveFluxBoundaryConditions):
30805  */
30806  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_18NumericalFlux_IIPG_1__init__, 0, __pyx_n_s_NumericalFlux_IIPG___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 439, __pyx_L1_error)
30807  __Pyx_GOTREF(__pyx_t_4);
30808  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
30809  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30810 
30811  /* "ADR.pyx":438
30812  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
30813  *
30814  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior): # <<<<<<<<<<<<<<
30815  * def __init__(self,vt,getPointwiseBoundaryConditions,
30816  * getAdvectiveFluxBoundaryConditions,
30817  */
30818  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NumericalFlux_IIPG, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 438, __pyx_L1_error)
30819  __Pyx_GOTREF(__pyx_t_4);
30820  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericalFlux_IIPG, __pyx_t_4) < 0) __PYX_ERR(0, 438, __pyx_L1_error)
30821  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30822  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30823  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30824  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30825 
30826  /* "ADR.pyx":446
30827  * getDiffusiveFluxBoundaryConditions)
30828  *
30829  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior): # <<<<<<<<<<<<<<
30830  * def __init__(self,vt,getPointwiseBoundaryConditions,
30831  * getAdvectiveFluxBoundaryConditions,
30832  */
30833  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
30834  __Pyx_GOTREF(__pyx_t_1);
30835  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
30836  __Pyx_GOTREF(__pyx_t_2);
30837  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30838  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Advection_DiagonalUpwind_Diffusi_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
30839  __Pyx_GOTREF(__pyx_t_1);
30840  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30841  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
30842  __Pyx_GOTREF(__pyx_t_2);
30843  __Pyx_GIVEREF(__pyx_t_1);
30844  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
30845  __pyx_t_1 = 0;
30846  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
30847  __Pyx_GOTREF(__pyx_t_1);
30848  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NumericalFlux_SIPG, __pyx_n_s_NumericalFlux_SIPG, (PyObject *) NULL, __pyx_n_s_ADR, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 446, __pyx_L1_error)
30849  __Pyx_GOTREF(__pyx_t_3);
30850 
30851  /* "ADR.pyx":447
30852  *
30853  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
30854  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
30855  * getAdvectiveFluxBoundaryConditions,
30856  * getDiffusiveFluxBoundaryConditions):
30857  */
30858  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_18NumericalFlux_SIPG_1__init__, 0, __pyx_n_s_NumericalFlux_SIPG___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error)
30859  __Pyx_GOTREF(__pyx_t_4);
30860  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
30861  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30862 
30863  /* "ADR.pyx":446
30864  * getDiffusiveFluxBoundaryConditions)
30865  *
30866  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior): # <<<<<<<<<<<<<<
30867  * def __init__(self,vt,getPointwiseBoundaryConditions,
30868  * getAdvectiveFluxBoundaryConditions,
30869  */
30870  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NumericalFlux_SIPG, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L1_error)
30871  __Pyx_GOTREF(__pyx_t_4);
30872  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericalFlux_SIPG, __pyx_t_4) < 0) __PYX_ERR(0, 446, __pyx_L1_error)
30873  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30874  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30875  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30876  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30877 
30878  /* "ADR.pyx":454
30879  * getDiffusiveFluxBoundaryConditions)
30880  *
30881  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior): # <<<<<<<<<<<<<<
30882  * def __init__(self,vt,getPointwiseBoundaryConditions,
30883  * getAdvectiveFluxBoundaryConditions,
30884  */
30885  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
30886  __Pyx_GOTREF(__pyx_t_2);
30887  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
30888  __Pyx_GOTREF(__pyx_t_1);
30889  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30890  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Advection_DiagonalUpwind_Diffusi_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
30891  __Pyx_GOTREF(__pyx_t_2);
30892  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30893  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
30894  __Pyx_GOTREF(__pyx_t_1);
30895  __Pyx_GIVEREF(__pyx_t_2);
30896  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
30897  __pyx_t_2 = 0;
30898  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
30899  __Pyx_GOTREF(__pyx_t_2);
30900  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_NumericalFlux_NIPG, __pyx_n_s_NumericalFlux_NIPG, (PyObject *) NULL, __pyx_n_s_ADR, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L1_error)
30901  __Pyx_GOTREF(__pyx_t_3);
30902 
30903  /* "ADR.pyx":455
30904  *
30905  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
30906  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
30907  * getAdvectiveFluxBoundaryConditions,
30908  * getDiffusiveFluxBoundaryConditions):
30909  */
30910  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_18NumericalFlux_NIPG_1__init__, 0, __pyx_n_s_NumericalFlux_NIPG___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 455, __pyx_L1_error)
30911  __Pyx_GOTREF(__pyx_t_4);
30912  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 455, __pyx_L1_error)
30913  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30914 
30915  /* "ADR.pyx":454
30916  * getDiffusiveFluxBoundaryConditions)
30917  *
30918  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior): # <<<<<<<<<<<<<<
30919  * def __init__(self,vt,getPointwiseBoundaryConditions,
30920  * getAdvectiveFluxBoundaryConditions,
30921  */
30922  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NumericalFlux_NIPG, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 454, __pyx_L1_error)
30923  __Pyx_GOTREF(__pyx_t_4);
30924  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericalFlux_NIPG, __pyx_t_4) < 0) __PYX_ERR(0, 454, __pyx_L1_error)
30925  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30926  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30927  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30928  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30929 
30930  /* "ADR.pyx":462
30931  * getDiffusiveFluxBoundaryConditions)
30932  *
30933  * NumericalFlux = NumericalFlux_SIPG # <<<<<<<<<<<<<<
30934  *
30935  * class Coefficients(TC_base):
30936  */
30937  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericalFlux_SIPG); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)
30938  __Pyx_GOTREF(__pyx_t_1);
30939  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericalFlux, __pyx_t_1) < 0) __PYX_ERR(0, 462, __pyx_L1_error)
30940  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30941 
30942  /* "ADR.pyx":464
30943  * NumericalFlux = NumericalFlux_SIPG
30944  *
30945  * class Coefficients(TC_base): # <<<<<<<<<<<<<<
30946  * """
30947  * Coefficients of linear ADR equations
30948  */
30949  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TC_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
30950  __Pyx_GOTREF(__pyx_t_1);
30951  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
30952  __Pyx_GOTREF(__pyx_t_2);
30953  __Pyx_GIVEREF(__pyx_t_1);
30954  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
30955  __pyx_t_1 = 0;
30956  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
30957  __Pyx_GOTREF(__pyx_t_1);
30958  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Coefficients, __pyx_n_s_Coefficients, (PyObject *) NULL, __pyx_n_s_ADR, __pyx_kp_s_Coefficients_of_linear_ADR_equa); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
30959  __Pyx_GOTREF(__pyx_t_3);
30960 
30961  /* "ADR.pyx":471
30962  * :parts: 2
30963  * """
30964  * from proteus.ctransportCoefficients import L2projectEvaluate # <<<<<<<<<<<<<<
30965  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None,
30966  * timeVaryingCoefficients=False,
30967  */
30968  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error)
30969  __Pyx_GOTREF(__pyx_t_4);
30970  __Pyx_INCREF(__pyx_n_s_L2projectEvaluate);
30971  __Pyx_GIVEREF(__pyx_n_s_L2projectEvaluate);
30972  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_L2projectEvaluate);
30973  __pyx_t_5 = __Pyx_Import(__pyx_n_s_proteus_ctransportCoefficients, __pyx_t_4, -1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L1_error)
30974  __Pyx_GOTREF(__pyx_t_5);
30975  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30976  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_L2projectEvaluate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error)
30977  __Pyx_GOTREF(__pyx_t_4);
30978  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_L2projectEvaluate, __pyx_t_4) < 0) __PYX_ERR(0, 471, __pyx_L1_error)
30979  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30980  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
30981 
30982  /* "ADR.pyx":472
30983  * """
30984  * from proteus.ctransportCoefficients import L2projectEvaluate
30985  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
30986  * timeVaryingCoefficients=False,
30987  * forceStrongDirichlet=False,
30988  */
30989  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_1__init__, 0, __pyx_n_s_Coefficients___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 472, __pyx_L1_error)
30990  __Pyx_GOTREF(__pyx_t_5);
30991  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__126);
30992  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
30993  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
30994 
30995  /* "ADR.pyx":514
30996  * useSparseDiffusion=True,
30997  * movingDomain=False)
30998  * def initializeElementQuadrature(self,t,cq): # <<<<<<<<<<<<<<
30999  * nd = self.nd
31000  * for ci in range(self.nc):
31001  */
31002  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_3initializeElementQuadrature, 0, __pyx_n_s_Coefficients_initializeElementQu, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error)
31003  __Pyx_GOTREF(__pyx_t_5);
31004  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_initializeElementQuadrature, __pyx_t_5) < 0) __PYX_ERR(0, 514, __pyx_L1_error)
31005  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31006 
31007  /* "ADR.pyx":525
31008  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
31009  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
31010  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global): # <<<<<<<<<<<<<<
31011  * nd = self.nd
31012  * for c in [cebq,cebq_global]:
31013  */
31014  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_5initializeElementBoundaryQuadrature, 0, __pyx_n_s_Coefficients_initializeElementBo, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 525, __pyx_L1_error)
31015  __Pyx_GOTREF(__pyx_t_5);
31016  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_initializeElementBoundaryQuadrat, __pyx_t_5) < 0) __PYX_ERR(0, 525, __pyx_L1_error)
31017  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31018 
31019  /* "ADR.pyx":538
31020  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
31021  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
31022  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe): # <<<<<<<<<<<<<<
31023  * nd = self.nd
31024  * for c in [cebqe]:
31025  */
31026  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature, 0, __pyx_n_s_Coefficients_initializeGlobalExt, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 538, __pyx_L1_error)
31027  __Pyx_GOTREF(__pyx_t_5);
31028  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_initializeGlobalExteriorElementB, __pyx_t_5) < 0) __PYX_ERR(0, 538, __pyx_L1_error)
31029  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31030 
31031  /* "ADR.pyx":551
31032  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
31033  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
31034  * def evaluate(self,t,c): # <<<<<<<<<<<<<<
31035  * if self.timeVaryingCoefficients:
31036  * nd = self.nd
31037  */
31038  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_9evaluate, 0, __pyx_n_s_Coefficients_evaluate, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 551, __pyx_L1_error)
31039  __Pyx_GOTREF(__pyx_t_5);
31040  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_evaluate, __pyx_t_5) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
31041  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31042 
31043  /* "ADR.pyx":464
31044  * NumericalFlux = NumericalFlux_SIPG
31045  *
31046  * class Coefficients(TC_base): # <<<<<<<<<<<<<<
31047  * """
31048  * Coefficients of linear ADR equations
31049  */
31050  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Coefficients, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L1_error)
31051  __Pyx_GOTREF(__pyx_t_5);
31052  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Coefficients, __pyx_t_5) < 0) __PYX_ERR(0, 464, __pyx_L1_error)
31053  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31054  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31055  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31056  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31057 
31058  /* "ADR.pyx":563
31059  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
31060  *
31061  * class LevelModel(proteus.Transport.OneLevelTransport): # <<<<<<<<<<<<<<
31062  * """
31063  * Optimized LevelModel for ADR equations
31064  */
31065  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
31066  __Pyx_GOTREF(__pyx_t_2);
31067  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Transport); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
31068  __Pyx_GOTREF(__pyx_t_1);
31069  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31070  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
31071  __Pyx_GOTREF(__pyx_t_2);
31072  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31073  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
31074  __Pyx_GOTREF(__pyx_t_1);
31075  __Pyx_GIVEREF(__pyx_t_2);
31076  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
31077  __pyx_t_2 = 0;
31078  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
31079  __Pyx_GOTREF(__pyx_t_2);
31080  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_LevelModel, __pyx_n_s_LevelModel, (PyObject *) NULL, __pyx_n_s_ADR, __pyx_kp_s_Optimized_LevelModel_for_ADR_eq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
31081  __Pyx_GOTREF(__pyx_t_3);
31082 
31083  /* "ADR.pyx":570
31084  * :parts: 2
31085  * """
31086  * nCalls=0 # <<<<<<<<<<<<<<
31087  * def __init__(self,
31088  * uDict,
31089  */
31090  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_nCalls, __pyx_int_0) < 0) __PYX_ERR(0, 570, __pyx_L1_error)
31091 
31092  /* "ADR.pyx":571
31093  * """
31094  * nCalls=0
31095  * def __init__(self, # <<<<<<<<<<<<<<
31096  * uDict,
31097  * phiDict,
31098  */
31099  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_1__init__, 0, __pyx_n_s_LevelModel___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error)
31100  __Pyx_GOTREF(__pyx_t_5);
31101  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__137);
31102  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 571, __pyx_L1_error)
31103  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31104 
31105  /* "ADR.pyx":934
31106  * compKernelFlag)
31107  * #mwf these are getting called by redistancing classes,
31108  * def calculateCoefficients(self): # <<<<<<<<<<<<<<
31109  * pass
31110  * def getResidual(self,u,r):
31111  */
31112  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_3calculateCoefficients, 0, __pyx_n_s_LevelModel_calculateCoefficients, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 934, __pyx_L1_error)
31113  __Pyx_GOTREF(__pyx_t_5);
31114  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateCoefficients, __pyx_t_5) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
31115  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31116 
31117  /* "ADR.pyx":936
31118  * def calculateCoefficients(self):
31119  * pass
31120  * def getResidual(self,u,r): # <<<<<<<<<<<<<<
31121  * import pdb
31122  * import copy
31123  */
31124  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_5getResidual, 0, __pyx_n_s_LevelModel_getResidual, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 936, __pyx_L1_error)
31125  __Pyx_GOTREF(__pyx_t_5);
31126  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_getResidual, __pyx_t_5) < 0) __PYX_ERR(0, 936, __pyx_L1_error)
31127  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31128 
31129  /* "ADR.pyx":1009
31130  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
31131  * self.nonlinear_function_evaluations += 1
31132  * def getJacobian(self,jacobian): # <<<<<<<<<<<<<<
31133  * #import superluWrappers
31134  * #import numpy
31135  */
31136  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_7getJacobian, 0, __pyx_n_s_LevelModel_getJacobian, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1009, __pyx_L1_error)
31137  __Pyx_GOTREF(__pyx_t_5);
31138  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_getJacobian, __pyx_t_5) < 0) __PYX_ERR(0, 1009, __pyx_L1_error)
31139  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31140 
31141  /* "ADR.pyx":1074
31142  * self.nonlinear_function_jacobian_evaluations += 1
31143  * return jacobian
31144  * def calculateElementQuadrature(self): # <<<<<<<<<<<<<<
31145  * """
31146  * Calculate the physical location and weights of the quadrature rules
31147  */
31148  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_9calculateElementQuadrature, 0, __pyx_n_s_LevelModel_calculateElementQuadr, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1074, __pyx_L1_error)
31149  __Pyx_GOTREF(__pyx_t_5);
31150  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateElementQuadrature, __pyx_t_5) < 0) __PYX_ERR(0, 1074, __pyx_L1_error)
31151  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31152 
31153  /* "ADR.pyx":1093
31154  * if self.shockCapturing is not None:
31155  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
31156  * def calculateElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
31157  * pass
31158  * def calculateExteriorElementBoundaryQuadrature(self):
31159  */
31160  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_11calculateElementBoundaryQuadrature, 0, __pyx_n_s_LevelModel_calculateElementBound, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1093, __pyx_L1_error)
31161  __Pyx_GOTREF(__pyx_t_5);
31162  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateElementBoundaryQuadratu, __pyx_t_5) < 0) __PYX_ERR(0, 1093, __pyx_L1_error)
31163  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31164 
31165  /* "ADR.pyx":1095
31166  * def calculateElementBoundaryQuadrature(self):
31167  * pass
31168  * def calculateExteriorElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
31169  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
31170  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
31171  */
31172  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature, 0, __pyx_n_s_LevelModel_calculateExteriorElem, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L1_error)
31173  __Pyx_GOTREF(__pyx_t_5);
31174  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateExteriorElementBoundary, __pyx_t_5) < 0) __PYX_ERR(0, 1095, __pyx_L1_error)
31175  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31176 
31177  /* "ADR.pyx":1109
31178  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
31179  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
31180  * def estimate_mt(self): # <<<<<<<<<<<<<<
31181  * pass
31182  * def calculateAuxiliaryQuantitiesAfterStep(self):
31183  */
31184  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_15estimate_mt, 0, __pyx_n_s_LevelModel_estimate_mt, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1109, __pyx_L1_error)
31185  __Pyx_GOTREF(__pyx_t_5);
31186  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_estimate_mt, __pyx_t_5) < 0) __PYX_ERR(0, 1109, __pyx_L1_error)
31187  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31188 
31189  /* "ADR.pyx":1111
31190  * def estimate_mt(self):
31191  * pass
31192  * def calculateAuxiliaryQuantitiesAfterStep(self): # <<<<<<<<<<<<<<
31193  * pass
31194  * def calculateSolutionAtQuadrature(self):
31195  */
31196  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep, 0, __pyx_n_s_LevelModel_calculateAuxiliaryQua, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1111, __pyx_L1_error)
31197  __Pyx_GOTREF(__pyx_t_5);
31198  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateAuxiliaryQuantitiesAfte, __pyx_t_5) < 0) __PYX_ERR(0, 1111, __pyx_L1_error)
31199  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31200 
31201  /* "ADR.pyx":1113
31202  * def calculateAuxiliaryQuantitiesAfterStep(self):
31203  * pass
31204  * def calculateSolutionAtQuadrature(self): # <<<<<<<<<<<<<<
31205  * pass
31206  */
31207  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_19calculateSolutionAtQuadrature, 0, __pyx_n_s_LevelModel_calculateSolutionAtQu, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1113, __pyx_L1_error)
31208  __Pyx_GOTREF(__pyx_t_5);
31209  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateSolutionAtQuadrature, __pyx_t_5) < 0) __PYX_ERR(0, 1113, __pyx_L1_error)
31210  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31211 
31212  /* "ADR.pyx":563
31213  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
31214  *
31215  * class LevelModel(proteus.Transport.OneLevelTransport): # <<<<<<<<<<<<<<
31216  * """
31217  * Optimized LevelModel for ADR equations
31218  */
31219  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_LevelModel, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 563, __pyx_L1_error)
31220  __Pyx_GOTREF(__pyx_t_5);
31221  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LevelModel, __pyx_t_5) < 0) __PYX_ERR(0, 563, __pyx_L1_error)
31222  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31223  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31224  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31225  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31226 
31227  /* "ADR.pyx":1
31228  * # A type of -*- python -*- file # <<<<<<<<<<<<<<
31229  * """
31230  * An optimized Advection-Diffusion-Reaction module
31231  */
31232  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
31233  __Pyx_GOTREF(__pyx_t_1);
31234  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31235  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31236 
31237  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
31238  * raise ImportError("numpy.core.umath failed to import")
31239  *
31240  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
31241  * try:
31242  * _import_umath()
31243  */
31244 
31245  /*--- Wrapped vars code ---*/
31246 
31247  goto __pyx_L0;
31248  __pyx_L1_error:;
31249  __Pyx_XDECREF(__pyx_t_1);
31250  __Pyx_XDECREF(__pyx_t_2);
31251  __Pyx_XDECREF(__pyx_t_3);
31252  __Pyx_XDECREF(__pyx_t_4);
31253  __Pyx_XDECREF(__pyx_t_5);
31254  if (__pyx_m) {
31255  if (__pyx_d) {
31256  __Pyx_AddTraceback("init ADR", __pyx_clineno, __pyx_lineno, __pyx_filename);
31257  }
31258  Py_DECREF(__pyx_m); __pyx_m = 0;
31259  } else if (!PyErr_Occurred()) {
31260  PyErr_SetString(PyExc_ImportError, "init ADR");
31261  }
31262  __pyx_L0:;
31263  __Pyx_RefNannyFinishContext();
31264  #if PY_MAJOR_VERSION < 3
31265  return;
31266  #else
31267  return __pyx_m;
31268  #endif
31269 }
31270 
31271 /* --- Runtime support code --- */
31272 /* Refnanny */
31273 #if CYTHON_REFNANNY
31274 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
31275  PyObject *m = NULL, *p = NULL;
31276  void *r = NULL;
31277  m = PyImport_ImportModule((char *)modname);
31278  if (!m) goto end;
31279  p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
31280  if (!p) goto end;
31281  r = PyLong_AsVoidPtr(p);
31282 end:
31283  Py_XDECREF(p);
31284  Py_XDECREF(m);
31285  return (__Pyx_RefNannyAPIStruct *)r;
31286 }
31287 #endif
31288 
31289 /* GetBuiltinName */
31290 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
31291  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
31292  if (unlikely(!result)) {
31293  PyErr_Format(PyExc_NameError,
31294 #if PY_MAJOR_VERSION >= 3
31295  "name '%U' is not defined", name);
31296 #else
31297  "name '%.200s' is not defined", PyString_AS_STRING(name));
31298 #endif
31299  }
31300  return result;
31301 }
31302 
31303 /* RaiseArgTupleInvalid */
31304 static void __Pyx_RaiseArgtupleInvalid(
31305  const char* func_name,
31306  int exact,
31307  Py_ssize_t num_min,
31308  Py_ssize_t num_max,
31309  Py_ssize_t num_found)
31310 {
31311  Py_ssize_t num_expected;
31312  const char *more_or_less;
31313  if (num_found < num_min) {
31314  num_expected = num_min;
31315  more_or_less = "at least";
31316  } else {
31317  num_expected = num_max;
31318  more_or_less = "at most";
31319  }
31320  if (exact) {
31321  more_or_less = "exactly";
31322  }
31323  PyErr_Format(PyExc_TypeError,
31324  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
31325  func_name, more_or_less, num_expected,
31326  (num_expected == 1) ? "" : "s", num_found);
31327 }
31328 
31329 /* RaiseDoubleKeywords */
31330 static void __Pyx_RaiseDoubleKeywordsError(
31331  const char* func_name,
31332  PyObject* kw_name)
31333 {
31334  PyErr_Format(PyExc_TypeError,
31335  #if PY_MAJOR_VERSION >= 3
31336  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
31337  #else
31338  "%s() got multiple values for keyword argument '%s'", func_name,
31339  PyString_AsString(kw_name));
31340  #endif
31341 }
31342 
31343 /* ParseKeywords */
31344 static int __Pyx_ParseOptionalKeywords(
31345  PyObject *kwds,
31346  PyObject **argnames[],
31347  PyObject *kwds2,
31348  PyObject *values[],
31349  Py_ssize_t num_pos_args,
31350  const char* function_name)
31351 {
31352  PyObject *key = 0, *value = 0;
31353  Py_ssize_t pos = 0;
31354  PyObject*** name;
31355  PyObject*** first_kw_arg = argnames + num_pos_args;
31356  while (PyDict_Next(kwds, &pos, &key, &value)) {
31357  name = first_kw_arg;
31358  while (*name && (**name != key)) name++;
31359  if (*name) {
31360  values[name-argnames] = value;
31361  continue;
31362  }
31363  name = first_kw_arg;
31364  #if PY_MAJOR_VERSION < 3
31365  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
31366  while (*name) {
31367  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
31368  && _PyString_Eq(**name, key)) {
31369  values[name-argnames] = value;
31370  break;
31371  }
31372  name++;
31373  }
31374  if (*name) continue;
31375  else {
31376  PyObject*** argname = argnames;
31377  while (argname != first_kw_arg) {
31378  if ((**argname == key) || (
31379  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
31380  && _PyString_Eq(**argname, key))) {
31381  goto arg_passed_twice;
31382  }
31383  argname++;
31384  }
31385  }
31386  } else
31387  #endif
31388  if (likely(PyUnicode_Check(key))) {
31389  while (*name) {
31390  int cmp = (**name == key) ? 0 :
31391  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
31392  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
31393  #endif
31394  PyUnicode_Compare(**name, key);
31395  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
31396  if (cmp == 0) {
31397  values[name-argnames] = value;
31398  break;
31399  }
31400  name++;
31401  }
31402  if (*name) continue;
31403  else {
31404  PyObject*** argname = argnames;
31405  while (argname != first_kw_arg) {
31406  int cmp = (**argname == key) ? 0 :
31407  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
31408  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
31409  #endif
31410  PyUnicode_Compare(**argname, key);
31411  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
31412  if (cmp == 0) goto arg_passed_twice;
31413  argname++;
31414  }
31415  }
31416  } else
31417  goto invalid_keyword_type;
31418  if (kwds2) {
31419  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
31420  } else {
31421  goto invalid_keyword;
31422  }
31423  }
31424  return 0;
31425 arg_passed_twice:
31426  __Pyx_RaiseDoubleKeywordsError(function_name, key);
31427  goto bad;
31428 invalid_keyword_type:
31429  PyErr_Format(PyExc_TypeError,
31430  "%.200s() keywords must be strings", function_name);
31431  goto bad;
31432 invalid_keyword:
31433  PyErr_Format(PyExc_TypeError,
31434  #if PY_MAJOR_VERSION < 3
31435  "%.200s() got an unexpected keyword argument '%.200s'",
31436  function_name, PyString_AsString(key));
31437  #else
31438  "%s() got an unexpected keyword argument '%U'",
31439  function_name, key);
31440  #endif
31441 bad:
31442  return -1;
31443 }
31444 
31445 /* ArgTypeTest */
31446 static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
31447  PyErr_Format(PyExc_TypeError,
31448  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
31449  name, type->tp_name, Py_TYPE(obj)->tp_name);
31450 }
31451 static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
31452  const char *name, int exact)
31453 {
31454  if (unlikely(!type)) {
31455  PyErr_SetString(PyExc_SystemError, "Missing type object");
31456  return 0;
31457  }
31458  if (none_allowed && obj == Py_None) return 1;
31459  else if (exact) {
31460  if (likely(Py_TYPE(obj) == type)) return 1;
31461  #if PY_MAJOR_VERSION == 2
31462  else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
31463  #endif
31464  }
31465  else {
31466  if (likely(PyObject_TypeCheck(obj, type))) return 1;
31467  }
31468  __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
31469  return 0;
31470 }
31471 
31472 /* PyCFunctionFastCall */
31473 #if CYTHON_FAST_PYCCALL
31474 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
31475  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
31476  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
31477  PyObject *self = PyCFunction_GET_SELF(func);
31478  assert(PyCFunction_Check(func));
31479  assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)));
31480  assert(nargs >= 0);
31481  assert(nargs == 0 || args != NULL);
31482  /* _PyCFunction_FastCallDict() must not be called with an exception set,
31483  because it may clear it (directly or indirectly) and so the
31484  caller loses its exception */
31485  assert(!PyErr_Occurred());
31486  return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
31487 }
31488 #endif // CYTHON_FAST_PYCCALL
31489 
31490 /* PyFunctionFastCall */
31491 #if CYTHON_FAST_PYCALL
31492 #include "frameobject.h"
31493 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
31494  PyObject *globals) {
31495  PyFrameObject *f;
31496  PyThreadState *tstate = PyThreadState_GET();
31497  PyObject **fastlocals;
31498  Py_ssize_t i;
31499  PyObject *result;
31500  assert(globals != NULL);
31501  /* XXX Perhaps we should create a specialized
31502  PyFrame_New() that doesn't take locals, but does
31503  take builtins without sanity checking them.
31504  */
31505  assert(tstate != NULL);
31506  f = PyFrame_New(tstate, co, globals, NULL);
31507  if (f == NULL) {
31508  return NULL;
31509  }
31510  fastlocals = f->f_localsplus;
31511  for (i = 0; i < na; i++) {
31512  Py_INCREF(*args);
31513  fastlocals[i] = *args++;
31514  }
31515  result = PyEval_EvalFrameEx(f,0);
31516  ++tstate->recursion_depth;
31517  Py_DECREF(f);
31518  --tstate->recursion_depth;
31519  return result;
31520 }
31521 #if 1 || PY_VERSION_HEX < 0x030600B1
31522 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
31523  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
31524  PyObject *globals = PyFunction_GET_GLOBALS(func);
31525  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
31526  PyObject *closure;
31527 #if PY_MAJOR_VERSION >= 3
31528  PyObject *kwdefs;
31529 #endif
31530  PyObject *kwtuple, **k;
31531  PyObject **d;
31532  Py_ssize_t nd;
31533  Py_ssize_t nk;
31534  PyObject *result;
31535  assert(kwargs == NULL || PyDict_Check(kwargs));
31536  nk = kwargs ? PyDict_Size(kwargs) : 0;
31537  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
31538  return NULL;
31539  }
31540  if (
31541 #if PY_MAJOR_VERSION >= 3
31542  co->co_kwonlyargcount == 0 &&
31543 #endif
31544  likely(kwargs == NULL || nk == 0) &&
31545  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
31546  if (argdefs == NULL && co->co_argcount == nargs) {
31547  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
31548  goto done;
31549  }
31550  else if (nargs == 0 && argdefs != NULL
31551  && co->co_argcount == Py_SIZE(argdefs)) {
31552  /* function called with no arguments, but all parameters have
31553  a default value: use default values as arguments .*/
31554  args = &PyTuple_GET_ITEM(argdefs, 0);
31555  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
31556  goto done;
31557  }
31558  }
31559  if (kwargs != NULL) {
31560  Py_ssize_t pos, i;
31561  kwtuple = PyTuple_New(2 * nk);
31562  if (kwtuple == NULL) {
31563  result = NULL;
31564  goto done;
31565  }
31566  k = &PyTuple_GET_ITEM(kwtuple, 0);
31567  pos = i = 0;
31568  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
31569  Py_INCREF(k[i]);
31570  Py_INCREF(k[i+1]);
31571  i += 2;
31572  }
31573  nk = i / 2;
31574  }
31575  else {
31576  kwtuple = NULL;
31577  k = NULL;
31578  }
31579  closure = PyFunction_GET_CLOSURE(func);
31580 #if PY_MAJOR_VERSION >= 3
31581  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
31582 #endif
31583  if (argdefs != NULL) {
31584  d = &PyTuple_GET_ITEM(argdefs, 0);
31585  nd = Py_SIZE(argdefs);
31586  }
31587  else {
31588  d = NULL;
31589  nd = 0;
31590  }
31591 #if PY_MAJOR_VERSION >= 3
31592  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
31593  args, nargs,
31594  k, (int)nk,
31595  d, (int)nd, kwdefs, closure);
31596 #else
31597  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
31598  args, nargs,
31599  k, (int)nk,
31600  d, (int)nd, closure);
31601 #endif
31602  Py_XDECREF(kwtuple);
31603 done:
31604  Py_LeaveRecursiveCall();
31605  return result;
31606 }
31607 #endif // CPython < 3.6
31608 #endif // CYTHON_FAST_PYCALL
31609 
31610 /* PyObjectCall */
31611 #if CYTHON_COMPILING_IN_CPYTHON
31612 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
31613  PyObject *result;
31614  ternaryfunc call = func->ob_type->tp_call;
31615  if (unlikely(!call))
31616  return PyObject_Call(func, arg, kw);
31617  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
31618  return NULL;
31619  result = (*call)(func, arg, kw);
31620  Py_LeaveRecursiveCall();
31621  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
31622  PyErr_SetString(
31623  PyExc_SystemError,
31624  "NULL result without error in PyObject_Call");
31625  }
31626  return result;
31627 }
31628 #endif
31629 
31630 /* PyObjectCallMethO */
31631 #if CYTHON_COMPILING_IN_CPYTHON
31632 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
31633  PyObject *self, *result;
31634  PyCFunction cfunc;
31635  cfunc = PyCFunction_GET_FUNCTION(func);
31636  self = PyCFunction_GET_SELF(func);
31637  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
31638  return NULL;
31639  result = cfunc(self, arg);
31640  Py_LeaveRecursiveCall();
31641  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
31642  PyErr_SetString(
31643  PyExc_SystemError,
31644  "NULL result without error in PyObject_Call");
31645  }
31646  return result;
31647 }
31648 #endif
31649 
31650 /* PyObjectCallOneArg */
31651 #if CYTHON_COMPILING_IN_CPYTHON
31652 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
31653  PyObject *result;
31654  PyObject *args = PyTuple_New(1);
31655  if (unlikely(!args)) return NULL;
31656  Py_INCREF(arg);
31657  PyTuple_SET_ITEM(args, 0, arg);
31658  result = __Pyx_PyObject_Call(func, args, NULL);
31659  Py_DECREF(args);
31660  return result;
31661 }
31662 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
31663 #if CYTHON_FAST_PYCALL
31664  if (PyFunction_Check(func)) {
31665  return __Pyx_PyFunction_FastCall(func, &arg, 1);
31666  }
31667 #endif
31668 #ifdef __Pyx_CyFunction_USED
31669  if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
31670 #else
31671  if (likely(PyCFunction_Check(func))) {
31672 #endif
31673  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
31674  return __Pyx_PyObject_CallMethO(func, arg);
31675 #if CYTHON_FAST_PYCCALL
31676  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
31677  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
31678 #endif
31679  }
31680  }
31681  return __Pyx__PyObject_CallOneArg(func, arg);
31682 }
31683 #else
31684 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
31685  PyObject *result;
31686  PyObject *args = PyTuple_Pack(1, arg);
31687  if (unlikely(!args)) return NULL;
31688  result = __Pyx_PyObject_Call(func, args, NULL);
31689  Py_DECREF(args);
31690  return result;
31691 }
31692 #endif
31693 
31694 /* PyObjectCallNoArg */
31695  #if CYTHON_COMPILING_IN_CPYTHON
31696 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
31697 #if CYTHON_FAST_PYCALL
31698  if (PyFunction_Check(func)) {
31699  return __Pyx_PyFunction_FastCall(func, NULL, 0);
31700  }
31701 #endif
31702 #ifdef __Pyx_CyFunction_USED
31703  if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
31704 #else
31705  if (likely(PyCFunction_Check(func))) {
31706 #endif
31707  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
31708  return __Pyx_PyObject_CallMethO(func, NULL);
31709  }
31710  }
31711  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
31712 }
31713 #endif
31714 
31715 /* RaiseTooManyValuesToUnpack */
31716  static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
31717  PyErr_Format(PyExc_ValueError,
31718  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
31719 }
31720 
31721 /* RaiseNeedMoreValuesToUnpack */
31722  static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
31723  PyErr_Format(PyExc_ValueError,
31724  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
31725  index, (index == 1) ? "" : "s");
31726 }
31727 
31728 /* IterFinish */
31729  static CYTHON_INLINE int __Pyx_IterFinish(void) {
31730 #if CYTHON_FAST_THREAD_STATE
31731  PyThreadState *tstate = PyThreadState_GET();
31732  PyObject* exc_type = tstate->curexc_type;
31733  if (unlikely(exc_type)) {
31734  if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
31735  PyObject *exc_value, *exc_tb;
31736  exc_value = tstate->curexc_value;
31737  exc_tb = tstate->curexc_traceback;
31738  tstate->curexc_type = 0;
31739  tstate->curexc_value = 0;
31740  tstate->curexc_traceback = 0;
31741  Py_DECREF(exc_type);
31742  Py_XDECREF(exc_value);
31743  Py_XDECREF(exc_tb);
31744  return 0;
31745  } else {
31746  return -1;
31747  }
31748  }
31749  return 0;
31750 #else
31751  if (unlikely(PyErr_Occurred())) {
31752  if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
31753  PyErr_Clear();
31754  return 0;
31755  } else {
31756  return -1;
31757  }
31758  }
31759  return 0;
31760 #endif
31761 }
31762 
31763 /* UnpackItemEndCheck */
31764  static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
31765  if (unlikely(retval)) {
31766  Py_DECREF(retval);
31767  __Pyx_RaiseTooManyValuesError(expected);
31768  return -1;
31769  } else {
31770  return __Pyx_IterFinish();
31771  }
31772  return 0;
31773 }
31774 
31775 /* ExtTypeTest */
31776  static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
31777  if (unlikely(!type)) {
31778  PyErr_SetString(PyExc_SystemError, "Missing type object");
31779  return 0;
31780  }
31781  if (likely(PyObject_TypeCheck(obj, type)))
31782  return 1;
31783  PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
31784  Py_TYPE(obj)->tp_name, type->tp_name);
31785  return 0;
31786 }
31787 
31788 /* GetModuleGlobalName */
31789  static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
31790  PyObject *result;
31791 #if !CYTHON_AVOID_BORROWED_REFS
31792  result = PyDict_GetItem(__pyx_d, name);
31793  if (likely(result)) {
31794  Py_INCREF(result);
31795  } else {
31796 #else
31797  result = PyObject_GetItem(__pyx_d, name);
31798  if (!result) {
31799  PyErr_Clear();
31800 #endif
31801  result = __Pyx_GetBuiltinName(name);
31802  }
31803  return result;
31804 }
31805 
31806 /* PyObjectCallMethod1 */
31807  static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
31808  PyObject *method, *result = NULL;
31809  method = __Pyx_PyObject_GetAttrStr(obj, method_name);
31810  if (unlikely(!method)) goto done;
31811 #if CYTHON_UNPACK_METHODS
31812  if (likely(PyMethod_Check(method))) {
31813  PyObject *self = PyMethod_GET_SELF(method);
31814  if (likely(self)) {
31815  PyObject *args;
31816  PyObject *function = PyMethod_GET_FUNCTION(method);
31817  #if CYTHON_FAST_PYCALL
31818  if (PyFunction_Check(function)) {
31819  PyObject *args[2] = {self, arg};
31820  result = __Pyx_PyFunction_FastCall(function, args, 2);
31821  goto done;
31822  }
31823  #endif
31824  #if CYTHON_FAST_PYCCALL
31825  if (__Pyx_PyFastCFunction_Check(function)) {
31826  PyObject *args[2] = {self, arg};
31827  result = __Pyx_PyCFunction_FastCall(function, args, 2);
31828  goto done;
31829  }
31830  #endif
31831  args = PyTuple_New(2);
31832  if (unlikely(!args)) goto done;
31833  Py_INCREF(self);
31834  PyTuple_SET_ITEM(args, 0, self);
31835  Py_INCREF(arg);
31836  PyTuple_SET_ITEM(args, 1, arg);
31837  Py_INCREF(function);
31838  Py_DECREF(method); method = NULL;
31839  result = __Pyx_PyObject_Call(function, args, NULL);
31840  Py_DECREF(args);
31841  Py_DECREF(function);
31842  return result;
31843  }
31844  }
31845 #endif
31846  result = __Pyx_PyObject_CallOneArg(method, arg);
31847 done:
31848  Py_XDECREF(method);
31849  return result;
31850 }
31851 
31852 /* append */
31853  static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
31854  if (likely(PyList_CheckExact(L))) {
31855  if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
31856  } else {
31857  PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
31858  if (unlikely(!retval))
31859  return -1;
31860  Py_DECREF(retval);
31861  }
31862  return 0;
31863 }
31864 
31865 /* PyIntBinop */
31866  #if !CYTHON_COMPILING_IN_PYPY
31867 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
31868  #if PY_MAJOR_VERSION < 3
31869  if (likely(PyInt_CheckExact(op1))) {
31870  const long b = intval;
31871  long x;
31872  long a = PyInt_AS_LONG(op1);
31873  x = (long)((unsigned long)a + b);
31874  if (likely((x^a) >= 0 || (x^b) >= 0))
31875  return PyInt_FromLong(x);
31876  return PyLong_Type.tp_as_number->nb_add(op1, op2);
31877  }
31878  #endif
31879  #if CYTHON_USE_PYLONG_INTERNALS
31880  if (likely(PyLong_CheckExact(op1))) {
31881  const long b = intval;
31882  long a, x;
31883 #ifdef HAVE_LONG_LONG
31884  const PY_LONG_LONG llb = intval;
31885  PY_LONG_LONG lla, llx;
31886 #endif
31887  const digit* digits = ((PyLongObject*)op1)->ob_digit;
31888  const Py_ssize_t size = Py_SIZE(op1);
31889  if (likely(__Pyx_sst_abs(size) <= 1)) {
31890  a = likely(size) ? digits[0] : 0;
31891  if (size == -1) a = -a;
31892  } else {
31893  switch (size) {
31894  case -2:
31895  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
31896  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31897  break;
31898 #ifdef HAVE_LONG_LONG
31899  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
31900  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31901  goto long_long;
31902 #endif
31903  }
31904  case 2:
31905  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
31906  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31907  break;
31908 #ifdef HAVE_LONG_LONG
31909  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
31910  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31911  goto long_long;
31912 #endif
31913  }
31914  case -3:
31915  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
31916  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31917  break;
31918 #ifdef HAVE_LONG_LONG
31919  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
31920  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31921  goto long_long;
31922 #endif
31923  }
31924  case 3:
31925  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
31926  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31927  break;
31928 #ifdef HAVE_LONG_LONG
31929  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
31930  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31931  goto long_long;
31932 #endif
31933  }
31934  case -4:
31935  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
31936  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31937  break;
31938 #ifdef HAVE_LONG_LONG
31939  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
31940  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31941  goto long_long;
31942 #endif
31943  }
31944  case 4:
31945  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
31946  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31947  break;
31948 #ifdef HAVE_LONG_LONG
31949  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
31950  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31951  goto long_long;
31952 #endif
31953  }
31954  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
31955  }
31956  }
31957  x = a + b;
31958  return PyLong_FromLong(x);
31959 #ifdef HAVE_LONG_LONG
31960  long_long:
31961  llx = lla + llb;
31962  return PyLong_FromLongLong(llx);
31963 #endif
31964 
31965 
31966  }
31967  #endif
31968  if (PyFloat_CheckExact(op1)) {
31969  const long b = intval;
31970  double a = PyFloat_AS_DOUBLE(op1);
31971  double result;
31972  PyFPE_START_PROTECT("add", return NULL)
31973  result = ((double)a) + (double)b;
31974  PyFPE_END_PROTECT(result)
31975  return PyFloat_FromDouble(result);
31976  }
31977  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
31978 }
31979 #endif
31980 
31981 /* SliceObject */
31982  static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
31983  Py_ssize_t cstart, Py_ssize_t cstop,
31984  PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
31985  int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
31986 #if CYTHON_USE_TYPE_SLOTS
31987  PyMappingMethods* mp;
31988 #if PY_MAJOR_VERSION < 3
31989  PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
31990  if (likely(ms && ms->sq_ass_slice)) {
31991  if (!has_cstart) {
31992  if (_py_start && (*_py_start != Py_None)) {
31993  cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
31994  if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
31995  } else
31996  cstart = 0;
31997  }
31998  if (!has_cstop) {
31999  if (_py_stop && (*_py_stop != Py_None)) {
32000  cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
32001  if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
32002  } else
32003  cstop = PY_SSIZE_T_MAX;
32004  }
32005  if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
32006  Py_ssize_t l = ms->sq_length(obj);
32007  if (likely(l >= 0)) {
32008  if (cstop < 0) {
32009  cstop += l;
32010  if (cstop < 0) cstop = 0;
32011  }
32012  if (cstart < 0) {
32013  cstart += l;
32014  if (cstart < 0) cstart = 0;
32015  }
32016  } else {
32017  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
32018  goto bad;
32019  PyErr_Clear();
32020  }
32021  }
32022  return ms->sq_ass_slice(obj, cstart, cstop, value);
32023  }
32024 #endif
32025  mp = Py_TYPE(obj)->tp_as_mapping;
32026  if (likely(mp && mp->mp_ass_subscript))
32027 #endif
32028  {
32029  int result;
32030  PyObject *py_slice, *py_start, *py_stop;
32031  if (_py_slice) {
32032  py_slice = *_py_slice;
32033  } else {
32034  PyObject* owned_start = NULL;
32035  PyObject* owned_stop = NULL;
32036  if (_py_start) {
32037  py_start = *_py_start;
32038  } else {
32039  if (has_cstart) {
32040  owned_start = py_start = PyInt_FromSsize_t(cstart);
32041  if (unlikely(!py_start)) goto bad;
32042  } else
32043  py_start = Py_None;
32044  }
32045  if (_py_stop) {
32046  py_stop = *_py_stop;
32047  } else {
32048  if (has_cstop) {
32049  owned_stop = py_stop = PyInt_FromSsize_t(cstop);
32050  if (unlikely(!py_stop)) {
32051  Py_XDECREF(owned_start);
32052  goto bad;
32053  }
32054  } else
32055  py_stop = Py_None;
32056  }
32057  py_slice = PySlice_New(py_start, py_stop, Py_None);
32058  Py_XDECREF(owned_start);
32059  Py_XDECREF(owned_stop);
32060  if (unlikely(!py_slice)) goto bad;
32061  }
32062 #if CYTHON_USE_TYPE_SLOTS
32063  result = mp->mp_ass_subscript(obj, py_slice, value);
32064 #else
32065  result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
32066 #endif
32067  if (!_py_slice) {
32068  Py_DECREF(py_slice);
32069  }
32070  return result;
32071  }
32072  PyErr_Format(PyExc_TypeError,
32073  "'%.200s' object does not support slice %.10s",
32074  Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
32075 bad:
32076  return -1;
32077 }
32078 
32079 /* GetItemInt */
32080  static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
32081  PyObject *r;
32082  if (!j) return NULL;
32083  r = PyObject_GetItem(o, j);
32084  Py_DECREF(j);
32085  return r;
32086 }
32087 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
32088  CYTHON_NCP_UNUSED int wraparound,
32089  CYTHON_NCP_UNUSED int boundscheck) {
32090 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
32091  if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
32092  if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
32093  PyObject *r = PyList_GET_ITEM(o, i);
32094  Py_INCREF(r);
32095  return r;
32096  }
32097  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
32098 #else
32099  return PySequence_GetItem(o, i);
32100 #endif
32101 }
32102 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
32103  CYTHON_NCP_UNUSED int wraparound,
32104  CYTHON_NCP_UNUSED int boundscheck) {
32105 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
32106  if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
32107  if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
32108  PyObject *r = PyTuple_GET_ITEM(o, i);
32109  Py_INCREF(r);
32110  return r;
32111  }
32112  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
32113 #else
32114  return PySequence_GetItem(o, i);
32115 #endif
32116 }
32117 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
32118  CYTHON_NCP_UNUSED int wraparound,
32119  CYTHON_NCP_UNUSED int boundscheck) {
32120 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
32121  if (is_list || PyList_CheckExact(o)) {
32122  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
32123  if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
32124  PyObject *r = PyList_GET_ITEM(o, n);
32125  Py_INCREF(r);
32126  return r;
32127  }
32128  }
32129  else if (PyTuple_CheckExact(o)) {
32130  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
32131  if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
32132  PyObject *r = PyTuple_GET_ITEM(o, n);
32133  Py_INCREF(r);
32134  return r;
32135  }
32136  } else {
32137  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
32138  if (likely(m && m->sq_item)) {
32139  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
32140  Py_ssize_t l = m->sq_length(o);
32141  if (likely(l >= 0)) {
32142  i += l;
32143  } else {
32144  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
32145  return NULL;
32146  PyErr_Clear();
32147  }
32148  }
32149  return m->sq_item(o, i);
32150  }
32151  }
32152 #else
32153  if (is_list || PySequence_Check(o)) {
32154  return PySequence_GetItem(o, i);
32155  }
32156 #endif
32157  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
32158 }
32159 
32160 /* SliceObject */
32161  static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
32162  Py_ssize_t cstart, Py_ssize_t cstop,
32163  PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
32164  int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
32165 #if CYTHON_USE_TYPE_SLOTS
32166  PyMappingMethods* mp;
32167 #if PY_MAJOR_VERSION < 3
32168  PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
32169  if (likely(ms && ms->sq_slice)) {
32170  if (!has_cstart) {
32171  if (_py_start && (*_py_start != Py_None)) {
32172  cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
32173  if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
32174  } else
32175  cstart = 0;
32176  }
32177  if (!has_cstop) {
32178  if (_py_stop && (*_py_stop != Py_None)) {
32179  cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
32180  if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
32181  } else
32182  cstop = PY_SSIZE_T_MAX;
32183  }
32184  if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
32185  Py_ssize_t l = ms->sq_length(obj);
32186  if (likely(l >= 0)) {
32187  if (cstop < 0) {
32188  cstop += l;
32189  if (cstop < 0) cstop = 0;
32190  }
32191  if (cstart < 0) {
32192  cstart += l;
32193  if (cstart < 0) cstart = 0;
32194  }
32195  } else {
32196  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
32197  goto bad;
32198  PyErr_Clear();
32199  }
32200  }
32201  return ms->sq_slice(obj, cstart, cstop);
32202  }
32203 #endif
32204  mp = Py_TYPE(obj)->tp_as_mapping;
32205  if (likely(mp && mp->mp_subscript))
32206 #endif
32207  {
32208  PyObject* result;
32209  PyObject *py_slice, *py_start, *py_stop;
32210  if (_py_slice) {
32211  py_slice = *_py_slice;
32212  } else {
32213  PyObject* owned_start = NULL;
32214  PyObject* owned_stop = NULL;
32215  if (_py_start) {
32216  py_start = *_py_start;
32217  } else {
32218  if (has_cstart) {
32219  owned_start = py_start = PyInt_FromSsize_t(cstart);
32220  if (unlikely(!py_start)) goto bad;
32221  } else
32222  py_start = Py_None;
32223  }
32224  if (_py_stop) {
32225  py_stop = *_py_stop;
32226  } else {
32227  if (has_cstop) {
32228  owned_stop = py_stop = PyInt_FromSsize_t(cstop);
32229  if (unlikely(!py_stop)) {
32230  Py_XDECREF(owned_start);
32231  goto bad;
32232  }
32233  } else
32234  py_stop = Py_None;
32235  }
32236  py_slice = PySlice_New(py_start, py_stop, Py_None);
32237  Py_XDECREF(owned_start);
32238  Py_XDECREF(owned_stop);
32239  if (unlikely(!py_slice)) goto bad;
32240  }
32241 #if CYTHON_USE_TYPE_SLOTS
32242  result = mp->mp_subscript(obj, py_slice);
32243 #else
32244  result = PyObject_GetItem(obj, py_slice);
32245 #endif
32246  if (!_py_slice) {
32247  Py_DECREF(py_slice);
32248  }
32249  return result;
32250  }
32251  PyErr_Format(PyExc_TypeError,
32252  "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
32253 bad:
32254  return NULL;
32255 }
32256 
32257 /* Import */
32258  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
32259  PyObject *empty_list = 0;
32260  PyObject *module = 0;
32261  PyObject *global_dict = 0;
32262  PyObject *empty_dict = 0;
32263  PyObject *list;
32264  #if PY_VERSION_HEX < 0x03030000
32265  PyObject *py_import;
32266  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
32267  if (!py_import)
32268  goto bad;
32269  #endif
32270  if (from_list)
32271  list = from_list;
32272  else {
32273  empty_list = PyList_New(0);
32274  if (!empty_list)
32275  goto bad;
32276  list = empty_list;
32277  }
32278  global_dict = PyModule_GetDict(__pyx_m);
32279  if (!global_dict)
32280  goto bad;
32281  empty_dict = PyDict_New();
32282  if (!empty_dict)
32283  goto bad;
32284  {
32285  #if PY_MAJOR_VERSION >= 3
32286  if (level == -1) {
32287  if (strchr(__Pyx_MODULE_NAME, '.')) {
32288  #if PY_VERSION_HEX < 0x03030000
32289  PyObject *py_level = PyInt_FromLong(1);
32290  if (!py_level)
32291  goto bad;
32292  module = PyObject_CallFunctionObjArgs(py_import,
32293  name, global_dict, empty_dict, list, py_level, NULL);
32294  Py_DECREF(py_level);
32295  #else
32296  module = PyImport_ImportModuleLevelObject(
32297  name, global_dict, empty_dict, list, 1);
32298  #endif
32299  if (!module) {
32300  if (!PyErr_ExceptionMatches(PyExc_ImportError))
32301  goto bad;
32302  PyErr_Clear();
32303  }
32304  }
32305  level = 0;
32306  }
32307  #endif
32308  if (!module) {
32309  #if PY_VERSION_HEX < 0x03030000
32310  PyObject *py_level = PyInt_FromLong(level);
32311  if (!py_level)
32312  goto bad;
32313  module = PyObject_CallFunctionObjArgs(py_import,
32314  name, global_dict, empty_dict, list, py_level, NULL);
32315  Py_DECREF(py_level);
32316  #else
32317  module = PyImport_ImportModuleLevelObject(
32318  name, global_dict, empty_dict, list, level);
32319  #endif
32320  }
32321  }
32322 bad:
32323  #if PY_VERSION_HEX < 0x03030000
32324  Py_XDECREF(py_import);
32325  #endif
32326  Py_XDECREF(empty_list);
32327  Py_XDECREF(empty_dict);
32328  return module;
32329 }
32330 
32331 /* ImportFrom */
32332  static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
32333  PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
32334  if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
32335  PyErr_Format(PyExc_ImportError,
32336  #if PY_MAJOR_VERSION < 3
32337  "cannot import name %.230s", PyString_AS_STRING(name));
32338  #else
32339  "cannot import name %S", name);
32340  #endif
32341  }
32342  return value;
32343 }
32344 
32345 /* BytesEquals */
32346  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
32347 #if CYTHON_COMPILING_IN_PYPY
32348  return PyObject_RichCompareBool(s1, s2, equals);
32349 #else
32350  if (s1 == s2) {
32351  return (equals == Py_EQ);
32352  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
32353  const char *ps1, *ps2;
32354  Py_ssize_t length = PyBytes_GET_SIZE(s1);
32355  if (length != PyBytes_GET_SIZE(s2))
32356  return (equals == Py_NE);
32357  ps1 = PyBytes_AS_STRING(s1);
32358  ps2 = PyBytes_AS_STRING(s2);
32359  if (ps1[0] != ps2[0]) {
32360  return (equals == Py_NE);
32361  } else if (length == 1) {
32362  return (equals == Py_EQ);
32363  } else {
32364  int result = memcmp(ps1, ps2, (size_t)length);
32365  return (equals == Py_EQ) ? (result == 0) : (result != 0);
32366  }
32367  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
32368  return (equals == Py_NE);
32369  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
32370  return (equals == Py_NE);
32371  } else {
32372  int result;
32373  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
32374  if (!py_result)
32375  return -1;
32376  result = __Pyx_PyObject_IsTrue(py_result);
32377  Py_DECREF(py_result);
32378  return result;
32379  }
32380 #endif
32381 }
32382 
32383 /* UnicodeEquals */
32384  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
32385 #if CYTHON_COMPILING_IN_PYPY
32386  return PyObject_RichCompareBool(s1, s2, equals);
32387 #else
32388 #if PY_MAJOR_VERSION < 3
32389  PyObject* owned_ref = NULL;
32390 #endif
32391  int s1_is_unicode, s2_is_unicode;
32392  if (s1 == s2) {
32393  goto return_eq;
32394  }
32395  s1_is_unicode = PyUnicode_CheckExact(s1);
32396  s2_is_unicode = PyUnicode_CheckExact(s2);
32397 #if PY_MAJOR_VERSION < 3
32398  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
32399  owned_ref = PyUnicode_FromObject(s2);
32400  if (unlikely(!owned_ref))
32401  return -1;
32402  s2 = owned_ref;
32403  s2_is_unicode = 1;
32404  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
32405  owned_ref = PyUnicode_FromObject(s1);
32406  if (unlikely(!owned_ref))
32407  return -1;
32408  s1 = owned_ref;
32409  s1_is_unicode = 1;
32410  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
32411  return __Pyx_PyBytes_Equals(s1, s2, equals);
32412  }
32413 #endif
32414  if (s1_is_unicode & s2_is_unicode) {
32415  Py_ssize_t length;
32416  int kind;
32417  void *data1, *data2;
32418  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
32419  return -1;
32420  length = __Pyx_PyUnicode_GET_LENGTH(s1);
32421  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
32422  goto return_ne;
32423  }
32424  kind = __Pyx_PyUnicode_KIND(s1);
32425  if (kind != __Pyx_PyUnicode_KIND(s2)) {
32426  goto return_ne;
32427  }
32428  data1 = __Pyx_PyUnicode_DATA(s1);
32429  data2 = __Pyx_PyUnicode_DATA(s2);
32430  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
32431  goto return_ne;
32432  } else if (length == 1) {
32433  goto return_eq;
32434  } else {
32435  int result = memcmp(data1, data2, (size_t)(length * kind));
32436  #if PY_MAJOR_VERSION < 3
32437  Py_XDECREF(owned_ref);
32438  #endif
32439  return (equals == Py_EQ) ? (result == 0) : (result != 0);
32440  }
32441  } else if ((s1 == Py_None) & s2_is_unicode) {
32442  goto return_ne;
32443  } else if ((s2 == Py_None) & s1_is_unicode) {
32444  goto return_ne;
32445  } else {
32446  int result;
32447  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
32448  if (!py_result)
32449  return -1;
32450  result = __Pyx_PyObject_IsTrue(py_result);
32451  Py_DECREF(py_result);
32452  return result;
32453  }
32454 return_eq:
32455  #if PY_MAJOR_VERSION < 3
32456  Py_XDECREF(owned_ref);
32457  #endif
32458  return (equals == Py_EQ);
32459 return_ne:
32460  #if PY_MAJOR_VERSION < 3
32461  Py_XDECREF(owned_ref);
32462  #endif
32463  return (equals == Py_NE);
32464 #endif
32465 }
32466 
32467 /* PyIntBinop */
32468  #if !CYTHON_COMPILING_IN_PYPY
32469 static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
32470  if (op1 == op2) {
32471  Py_RETURN_TRUE;
32472  }
32473  #if PY_MAJOR_VERSION < 3
32474  if (likely(PyInt_CheckExact(op1))) {
32475  const long b = intval;
32476  long a = PyInt_AS_LONG(op1);
32477  if (a == b) {
32478  Py_RETURN_TRUE;
32479  } else {
32480  Py_RETURN_FALSE;
32481  }
32482  }
32483  #endif
32484  #if CYTHON_USE_PYLONG_INTERNALS
32485  if (likely(PyLong_CheckExact(op1))) {
32486  const long b = intval;
32487  long a;
32488  const digit* digits = ((PyLongObject*)op1)->ob_digit;
32489  const Py_ssize_t size = Py_SIZE(op1);
32490  if (likely(__Pyx_sst_abs(size) <= 1)) {
32491  a = likely(size) ? digits[0] : 0;
32492  if (size == -1) a = -a;
32493  } else {
32494  switch (size) {
32495  case -2:
32496  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
32497  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
32498  break;
32499  }
32500  case 2:
32501  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
32502  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
32503  break;
32504  }
32505  case -3:
32506  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
32507  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
32508  break;
32509  }
32510  case 3:
32511  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
32512  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
32513  break;
32514  }
32515  case -4:
32516  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
32517  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
32518  break;
32519  }
32520  case 4:
32521  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
32522  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
32523  break;
32524  }
32525  #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
32526  default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
32527  #else
32528  default: Py_RETURN_FALSE;
32529  #endif
32530  }
32531  }
32532  if (a == b) {
32533  Py_RETURN_TRUE;
32534  } else {
32535  Py_RETURN_FALSE;
32536  }
32537  }
32538  #endif
32539  if (PyFloat_CheckExact(op1)) {
32540  const long b = intval;
32541  double a = PyFloat_AS_DOUBLE(op1);
32542  if ((double)a == (double)b) {
32543  Py_RETURN_TRUE;
32544  } else {
32545  Py_RETURN_FALSE;
32546  }
32547  }
32548  return PyObject_RichCompare(op1, op2, Py_EQ);
32549 }
32550 #endif
32551 
32552 /* PyObjectCallMethod0 */
32553  static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
32554  PyObject *method, *result = NULL;
32555  method = __Pyx_PyObject_GetAttrStr(obj, method_name);
32556  if (unlikely(!method)) goto bad;
32557 #if CYTHON_UNPACK_METHODS
32558  if (likely(PyMethod_Check(method))) {
32559  PyObject *self = PyMethod_GET_SELF(method);
32560  if (likely(self)) {
32561  PyObject *function = PyMethod_GET_FUNCTION(method);
32562  result = __Pyx_PyObject_CallOneArg(function, self);
32563  Py_DECREF(method);
32564  return result;
32565  }
32566  }
32567 #endif
32568  result = __Pyx_PyObject_CallNoArg(method);
32569  Py_DECREF(method);
32570 bad:
32571  return result;
32572 }
32573 
32574 /* RaiseNoneIterError */
32575  static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
32576  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
32577 }
32578 
32579 /* UnpackTupleError */
32580  static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
32581  if (t == Py_None) {
32582  __Pyx_RaiseNoneNotIterableError();
32583  } else if (PyTuple_GET_SIZE(t) < index) {
32584  __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
32585  } else {
32586  __Pyx_RaiseTooManyValuesError(index);
32587  }
32588 }
32589 
32590 /* UnpackTuple2 */
32591  static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
32592  int is_tuple, int has_known_size, int decref_tuple) {
32593  Py_ssize_t index;
32594  PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
32595  if (!is_tuple && unlikely(!PyTuple_Check(tuple))) {
32596  iternextfunc iternext;
32597  iter = PyObject_GetIter(tuple);
32598  if (unlikely(!iter)) goto bad;
32599  if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
32600  iternext = Py_TYPE(iter)->tp_iternext;
32601  value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
32602  value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
32603  if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
32604  Py_DECREF(iter);
32605  } else {
32606  if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) {
32607  __Pyx_UnpackTupleError(tuple, 2);
32608  goto bad;
32609  }
32610 #if CYTHON_COMPILING_IN_PYPY
32611  value1 = PySequence_ITEM(tuple, 0);
32612  if (unlikely(!value1)) goto bad;
32613  value2 = PySequence_ITEM(tuple, 1);
32614  if (unlikely(!value2)) goto bad;
32615 #else
32616  value1 = PyTuple_GET_ITEM(tuple, 0);
32617  value2 = PyTuple_GET_ITEM(tuple, 1);
32618  Py_INCREF(value1);
32619  Py_INCREF(value2);
32620 #endif
32621  if (decref_tuple) { Py_DECREF(tuple); }
32622  }
32623  *pvalue1 = value1;
32624  *pvalue2 = value2;
32625  return 0;
32626 unpacking_failed:
32627  if (!has_known_size && __Pyx_IterFinish() == 0)
32628  __Pyx_RaiseNeedMoreValuesError(index);
32629 bad:
32630  Py_XDECREF(iter);
32631  Py_XDECREF(value1);
32632  Py_XDECREF(value2);
32633  if (decref_tuple) { Py_XDECREF(tuple); }
32634  return -1;
32635 }
32636 
32637 /* dict_iter */
32638  static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
32639  Py_ssize_t* p_orig_length, int* p_source_is_dict) {
32640  is_dict = is_dict || likely(PyDict_CheckExact(iterable));
32641  *p_source_is_dict = is_dict;
32642 #if !CYTHON_COMPILING_IN_PYPY
32643  if (is_dict) {
32644  *p_orig_length = PyDict_Size(iterable);
32645  Py_INCREF(iterable);
32646  return iterable;
32647  }
32648 #endif
32649  *p_orig_length = 0;
32650  if (method_name) {
32651  PyObject* iter;
32652  iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
32653  if (!iterable)
32654  return NULL;
32655 #if !CYTHON_COMPILING_IN_PYPY
32656  if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
32657  return iterable;
32658 #endif
32659  iter = PyObject_GetIter(iterable);
32660  Py_DECREF(iterable);
32661  return iter;
32662  }
32663  return PyObject_GetIter(iterable);
32664 }
32665 static CYTHON_INLINE int __Pyx_dict_iter_next(
32666  PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
32667  PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
32668  PyObject* next_item;
32669 #if !CYTHON_COMPILING_IN_PYPY
32670  if (source_is_dict) {
32671  PyObject *key, *value;
32672  if (unlikely(orig_length != PyDict_Size(iter_obj))) {
32673  PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
32674  return -1;
32675  }
32676  if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
32677  return 0;
32678  }
32679  if (pitem) {
32680  PyObject* tuple = PyTuple_New(2);
32681  if (unlikely(!tuple)) {
32682  return -1;
32683  }
32684  Py_INCREF(key);
32685  Py_INCREF(value);
32686  PyTuple_SET_ITEM(tuple, 0, key);
32687  PyTuple_SET_ITEM(tuple, 1, value);
32688  *pitem = tuple;
32689  } else {
32690  if (pkey) {
32691  Py_INCREF(key);
32692  *pkey = key;
32693  }
32694  if (pvalue) {
32695  Py_INCREF(value);
32696  *pvalue = value;
32697  }
32698  }
32699  return 1;
32700  } else if (PyTuple_CheckExact(iter_obj)) {
32701  Py_ssize_t pos = *ppos;
32702  if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
32703  *ppos = pos + 1;
32704  next_item = PyTuple_GET_ITEM(iter_obj, pos);
32705  Py_INCREF(next_item);
32706  } else if (PyList_CheckExact(iter_obj)) {
32707  Py_ssize_t pos = *ppos;
32708  if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
32709  *ppos = pos + 1;
32710  next_item = PyList_GET_ITEM(iter_obj, pos);
32711  Py_INCREF(next_item);
32712  } else
32713 #endif
32714  {
32715  next_item = PyIter_Next(iter_obj);
32716  if (unlikely(!next_item)) {
32717  return __Pyx_IterFinish();
32718  }
32719  }
32720  if (pitem) {
32721  *pitem = next_item;
32722  } else if (pkey && pvalue) {
32723  if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
32724  return -1;
32725  } else if (pkey) {
32726  *pkey = next_item;
32727  } else {
32728  *pvalue = next_item;
32729  }
32730  return 1;
32731 }
32732 
32733 /* PyErrFetchRestore */
32734  #if CYTHON_FAST_THREAD_STATE
32735 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
32736  PyObject *tmp_type, *tmp_value, *tmp_tb;
32737  tmp_type = tstate->curexc_type;
32738  tmp_value = tstate->curexc_value;
32739  tmp_tb = tstate->curexc_traceback;
32740  tstate->curexc_type = type;
32741  tstate->curexc_value = value;
32742  tstate->curexc_traceback = tb;
32743  Py_XDECREF(tmp_type);
32744  Py_XDECREF(tmp_value);
32745  Py_XDECREF(tmp_tb);
32746 }
32747 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
32748  *type = tstate->curexc_type;
32749  *value = tstate->curexc_value;
32750  *tb = tstate->curexc_traceback;
32751  tstate->curexc_type = 0;
32752  tstate->curexc_value = 0;
32753  tstate->curexc_traceback = 0;
32754 }
32755 #endif
32756 
32757 /* RaiseException */
32758  #if PY_MAJOR_VERSION < 3
32759 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
32760  CYTHON_UNUSED PyObject *cause) {
32761  __Pyx_PyThreadState_declare
32762  Py_XINCREF(type);
32763  if (!value || value == Py_None)
32764  value = NULL;
32765  else
32766  Py_INCREF(value);
32767  if (!tb || tb == Py_None)
32768  tb = NULL;
32769  else {
32770  Py_INCREF(tb);
32771  if (!PyTraceBack_Check(tb)) {
32772  PyErr_SetString(PyExc_TypeError,
32773  "raise: arg 3 must be a traceback or None");
32774  goto raise_error;
32775  }
32776  }
32777  if (PyType_Check(type)) {
32778 #if CYTHON_COMPILING_IN_PYPY
32779  if (!value) {
32780  Py_INCREF(Py_None);
32781  value = Py_None;
32782  }
32783 #endif
32784  PyErr_NormalizeException(&type, &value, &tb);
32785  } else {
32786  if (value) {
32787  PyErr_SetString(PyExc_TypeError,
32788  "instance exception may not have a separate value");
32789  goto raise_error;
32790  }
32791  value = type;
32792  type = (PyObject*) Py_TYPE(type);
32793  Py_INCREF(type);
32794  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
32795  PyErr_SetString(PyExc_TypeError,
32796  "raise: exception class must be a subclass of BaseException");
32797  goto raise_error;
32798  }
32799  }
32800  __Pyx_PyThreadState_assign
32801  __Pyx_ErrRestore(type, value, tb);
32802  return;
32803 raise_error:
32804  Py_XDECREF(value);
32805  Py_XDECREF(type);
32806  Py_XDECREF(tb);
32807  return;
32808 }
32809 #else
32810 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
32811  PyObject* owned_instance = NULL;
32812  if (tb == Py_None) {
32813  tb = 0;
32814  } else if (tb && !PyTraceBack_Check(tb)) {
32815  PyErr_SetString(PyExc_TypeError,
32816  "raise: arg 3 must be a traceback or None");
32817  goto bad;
32818  }
32819  if (value == Py_None)
32820  value = 0;
32821  if (PyExceptionInstance_Check(type)) {
32822  if (value) {
32823  PyErr_SetString(PyExc_TypeError,
32824  "instance exception may not have a separate value");
32825  goto bad;
32826  }
32827  value = type;
32828  type = (PyObject*) Py_TYPE(value);
32829  } else if (PyExceptionClass_Check(type)) {
32830  PyObject *instance_class = NULL;
32831  if (value && PyExceptionInstance_Check(value)) {
32832  instance_class = (PyObject*) Py_TYPE(value);
32833  if (instance_class != type) {
32834  int is_subclass = PyObject_IsSubclass(instance_class, type);
32835  if (!is_subclass) {
32836  instance_class = NULL;
32837  } else if (unlikely(is_subclass == -1)) {
32838  goto bad;
32839  } else {
32840  type = instance_class;
32841  }
32842  }
32843  }
32844  if (!instance_class) {
32845  PyObject *args;
32846  if (!value)
32847  args = PyTuple_New(0);
32848  else if (PyTuple_Check(value)) {
32849  Py_INCREF(value);
32850  args = value;
32851  } else
32852  args = PyTuple_Pack(1, value);
32853  if (!args)
32854  goto bad;
32855  owned_instance = PyObject_Call(type, args, NULL);
32856  Py_DECREF(args);
32857  if (!owned_instance)
32858  goto bad;
32859  value = owned_instance;
32860  if (!PyExceptionInstance_Check(value)) {
32861  PyErr_Format(PyExc_TypeError,
32862  "calling %R should have returned an instance of "
32863  "BaseException, not %R",
32864  type, Py_TYPE(value));
32865  goto bad;
32866  }
32867  }
32868  } else {
32869  PyErr_SetString(PyExc_TypeError,
32870  "raise: exception class must be a subclass of BaseException");
32871  goto bad;
32872  }
32873 #if PY_VERSION_HEX >= 0x03030000
32874  if (cause) {
32875 #else
32876  if (cause && cause != Py_None) {
32877 #endif
32878  PyObject *fixed_cause;
32879  if (cause == Py_None) {
32880  fixed_cause = NULL;
32881  } else if (PyExceptionClass_Check(cause)) {
32882  fixed_cause = PyObject_CallObject(cause, NULL);
32883  if (fixed_cause == NULL)
32884  goto bad;
32885  } else if (PyExceptionInstance_Check(cause)) {
32886  fixed_cause = cause;
32887  Py_INCREF(fixed_cause);
32888  } else {
32889  PyErr_SetString(PyExc_TypeError,
32890  "exception causes must derive from "
32891  "BaseException");
32892  goto bad;
32893  }
32894  PyException_SetCause(value, fixed_cause);
32895  }
32896  PyErr_SetObject(type, value);
32897  if (tb) {
32898 #if CYTHON_COMPILING_IN_PYPY
32899  PyObject *tmp_type, *tmp_value, *tmp_tb;
32900  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
32901  Py_INCREF(tb);
32902  PyErr_Restore(tmp_type, tmp_value, tb);
32903  Py_XDECREF(tmp_tb);
32904 #else
32905  PyThreadState *tstate = PyThreadState_GET();
32906  PyObject* tmp_tb = tstate->curexc_traceback;
32907  if (tb != tmp_tb) {
32908  Py_INCREF(tb);
32909  tstate->curexc_traceback = tb;
32910  Py_XDECREF(tmp_tb);
32911  }
32912 #endif
32913  }
32914 bad:
32915  Py_XDECREF(owned_instance);
32916  return;
32917 }
32918 #endif
32919 
32920 /* SaveResetException */
32921  #if CYTHON_FAST_THREAD_STATE
32922 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
32923  *type = tstate->exc_type;
32924  *value = tstate->exc_value;
32925  *tb = tstate->exc_traceback;
32926  Py_XINCREF(*type);
32927  Py_XINCREF(*value);
32928  Py_XINCREF(*tb);
32929 }
32930 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
32931  PyObject *tmp_type, *tmp_value, *tmp_tb;
32932  tmp_type = tstate->exc_type;
32933  tmp_value = tstate->exc_value;
32934  tmp_tb = tstate->exc_traceback;
32935  tstate->exc_type = type;
32936  tstate->exc_value = value;
32937  tstate->exc_traceback = tb;
32938  Py_XDECREF(tmp_type);
32939  Py_XDECREF(tmp_value);
32940  Py_XDECREF(tmp_tb);
32941 }
32942 #endif
32943 
32944 /* PyErrExceptionMatches */
32945  #if CYTHON_FAST_THREAD_STATE
32946 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
32947  PyObject *exc_type = tstate->curexc_type;
32948  if (exc_type == err) return 1;
32949  if (unlikely(!exc_type)) return 0;
32950  return PyErr_GivenExceptionMatches(exc_type, err);
32951 }
32952 #endif
32953 
32954 /* GetException */
32955  #if CYTHON_FAST_THREAD_STATE
32956 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
32957 #else
32958 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
32959 #endif
32960  PyObject *local_type, *local_value, *local_tb;
32961 #if CYTHON_FAST_THREAD_STATE
32962  PyObject *tmp_type, *tmp_value, *tmp_tb;
32963  local_type = tstate->curexc_type;
32964  local_value = tstate->curexc_value;
32965  local_tb = tstate->curexc_traceback;
32966  tstate->curexc_type = 0;
32967  tstate->curexc_value = 0;
32968  tstate->curexc_traceback = 0;
32969 #else
32970  PyErr_Fetch(&local_type, &local_value, &local_tb);
32971 #endif
32972  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
32973 #if CYTHON_FAST_THREAD_STATE
32974  if (unlikely(tstate->curexc_type))
32975 #else
32976  if (unlikely(PyErr_Occurred()))
32977 #endif
32978  goto bad;
32979  #if PY_MAJOR_VERSION >= 3
32980  if (local_tb) {
32981  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
32982  goto bad;
32983  }
32984  #endif
32985  Py_XINCREF(local_tb);
32986  Py_XINCREF(local_type);
32987  Py_XINCREF(local_value);
32988  *type = local_type;
32989  *value = local_value;
32990  *tb = local_tb;
32991 #if CYTHON_FAST_THREAD_STATE
32992  tmp_type = tstate->exc_type;
32993  tmp_value = tstate->exc_value;
32994  tmp_tb = tstate->exc_traceback;
32995  tstate->exc_type = local_type;
32996  tstate->exc_value = local_value;
32997  tstate->exc_traceback = local_tb;
32998  Py_XDECREF(tmp_type);
32999  Py_XDECREF(tmp_value);
33000  Py_XDECREF(tmp_tb);
33001 #else
33002  PyErr_SetExcInfo(local_type, local_value, local_tb);
33003 #endif
33004  return 0;
33005 bad:
33006  *type = 0;
33007  *value = 0;
33008  *tb = 0;
33009  Py_XDECREF(local_type);
33010  Py_XDECREF(local_value);
33011  Py_XDECREF(local_tb);
33012  return -1;
33013 }
33014 
33015 /* CalculateMetaclass */
33016  static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
33017  Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
33018  for (i=0; i < nbases; i++) {
33019  PyTypeObject *tmptype;
33020  PyObject *tmp = PyTuple_GET_ITEM(bases, i);
33021  tmptype = Py_TYPE(tmp);
33022 #if PY_MAJOR_VERSION < 3
33023  if (tmptype == &PyClass_Type)
33024  continue;
33025 #endif
33026  if (!metaclass) {
33027  metaclass = tmptype;
33028  continue;
33029  }
33030  if (PyType_IsSubtype(metaclass, tmptype))
33031  continue;
33032  if (PyType_IsSubtype(tmptype, metaclass)) {
33033  metaclass = tmptype;
33034  continue;
33035  }
33036  PyErr_SetString(PyExc_TypeError,
33037  "metaclass conflict: "
33038  "the metaclass of a derived class "
33039  "must be a (non-strict) subclass "
33040  "of the metaclasses of all its bases");
33041  return NULL;
33042  }
33043  if (!metaclass) {
33044 #if PY_MAJOR_VERSION < 3
33045  metaclass = &PyClass_Type;
33046 #else
33047  metaclass = &PyType_Type;
33048 #endif
33049  }
33050  Py_INCREF((PyObject*) metaclass);
33051  return (PyObject*) metaclass;
33052 }
33053 
33054 /* FetchCommonType */
33055  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
33056  PyObject* fake_module;
33057  PyTypeObject* cached_type = NULL;
33058  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
33059  if (!fake_module) return NULL;
33060  Py_INCREF(fake_module);
33061  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
33062  if (cached_type) {
33063  if (!PyType_Check((PyObject*)cached_type)) {
33064  PyErr_Format(PyExc_TypeError,
33065  "Shared Cython type %.200s is not a type object",
33066  type->tp_name);
33067  goto bad;
33068  }
33069  if (cached_type->tp_basicsize != type->tp_basicsize) {
33070  PyErr_Format(PyExc_TypeError,
33071  "Shared Cython type %.200s has the wrong size, try recompiling",
33072  type->tp_name);
33073  goto bad;
33074  }
33075  } else {
33076  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
33077  PyErr_Clear();
33078  if (PyType_Ready(type) < 0) goto bad;
33079  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
33080  goto bad;
33081  Py_INCREF(type);
33082  cached_type = type;
33083  }
33084 done:
33085  Py_DECREF(fake_module);
33086  return cached_type;
33087 bad:
33088  Py_XDECREF(cached_type);
33089  cached_type = NULL;
33090  goto done;
33091 }
33092 
33093 /* CythonFunction */
33094  static PyObject *
33095 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
33096 {
33097  if (unlikely(op->func_doc == NULL)) {
33098  if (op->func.m_ml->ml_doc) {
33099 #if PY_MAJOR_VERSION >= 3
33100  op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
33101 #else
33102  op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
33103 #endif
33104  if (unlikely(op->func_doc == NULL))
33105  return NULL;
33106  } else {
33107  Py_INCREF(Py_None);
33108  return Py_None;
33109  }
33110  }
33111  Py_INCREF(op->func_doc);
33112  return op->func_doc;
33113 }
33114 static int
33115 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
33116 {
33117  PyObject *tmp = op->func_doc;
33118  if (value == NULL) {
33119  value = Py_None;
33120  }
33121  Py_INCREF(value);
33122  op->func_doc = value;
33123  Py_XDECREF(tmp);
33124  return 0;
33125 }
33126 static PyObject *
33127 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
33128 {
33129  if (unlikely(op->func_name == NULL)) {
33130 #if PY_MAJOR_VERSION >= 3
33131  op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
33132 #else
33133  op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
33134 #endif
33135  if (unlikely(op->func_name == NULL))
33136  return NULL;
33137  }
33138  Py_INCREF(op->func_name);
33139  return op->func_name;
33140 }
33141 static int
33142 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
33143 {
33144  PyObject *tmp;
33145 #if PY_MAJOR_VERSION >= 3
33146  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
33147 #else
33148  if (unlikely(value == NULL || !PyString_Check(value))) {
33149 #endif
33150  PyErr_SetString(PyExc_TypeError,
33151  "__name__ must be set to a string object");
33152  return -1;
33153  }
33154  tmp = op->func_name;
33155  Py_INCREF(value);
33156  op->func_name = value;
33157  Py_XDECREF(tmp);
33158  return 0;
33159 }
33160 static PyObject *
33161 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
33162 {
33163  Py_INCREF(op->func_qualname);
33164  return op->func_qualname;
33165 }
33166 static int
33167 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
33168 {
33169  PyObject *tmp;
33170 #if PY_MAJOR_VERSION >= 3
33171  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
33172 #else
33173  if (unlikely(value == NULL || !PyString_Check(value))) {
33174 #endif
33175  PyErr_SetString(PyExc_TypeError,
33176  "__qualname__ must be set to a string object");
33177  return -1;
33178  }
33179  tmp = op->func_qualname;
33180  Py_INCREF(value);
33181  op->func_qualname = value;
33182  Py_XDECREF(tmp);
33183  return 0;
33184 }
33185 static PyObject *
33186 __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
33187 {
33188  PyObject *self;
33189  self = m->func_closure;
33190  if (self == NULL)
33191  self = Py_None;
33192  Py_INCREF(self);
33193  return self;
33194 }
33195 static PyObject *
33196 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
33197 {
33198  if (unlikely(op->func_dict == NULL)) {
33199  op->func_dict = PyDict_New();
33200  if (unlikely(op->func_dict == NULL))
33201  return NULL;
33202  }
33203  Py_INCREF(op->func_dict);
33204  return op->func_dict;
33205 }
33206 static int
33207 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
33208 {
33209  PyObject *tmp;
33210  if (unlikely(value == NULL)) {
33211  PyErr_SetString(PyExc_TypeError,
33212  "function's dictionary may not be deleted");
33213  return -1;
33214  }
33215  if (unlikely(!PyDict_Check(value))) {
33216  PyErr_SetString(PyExc_TypeError,
33217  "setting function's dictionary to a non-dict");
33218  return -1;
33219  }
33220  tmp = op->func_dict;
33221  Py_INCREF(value);
33222  op->func_dict = value;
33223  Py_XDECREF(tmp);
33224  return 0;
33225 }
33226 static PyObject *
33227 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
33228 {
33229  Py_INCREF(op->func_globals);
33230  return op->func_globals;
33231 }
33232 static PyObject *
33233 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
33234 {
33235  Py_INCREF(Py_None);
33236  return Py_None;
33237 }
33238 static PyObject *
33239 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
33240 {
33241  PyObject* result = (op->func_code) ? op->func_code : Py_None;
33242  Py_INCREF(result);
33243  return result;
33244 }
33245 static int
33246 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
33247  int result = 0;
33248  PyObject *res = op->defaults_getter((PyObject *) op);
33249  if (unlikely(!res))
33250  return -1;
33251  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
33252  op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
33253  Py_INCREF(op->defaults_tuple);
33254  op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
33255  Py_INCREF(op->defaults_kwdict);
33256  #else
33257  op->defaults_tuple = PySequence_ITEM(res, 0);
33258  if (unlikely(!op->defaults_tuple)) result = -1;
33259  else {
33260  op->defaults_kwdict = PySequence_ITEM(res, 1);
33261  if (unlikely(!op->defaults_kwdict)) result = -1;
33262  }
33263  #endif
33264  Py_DECREF(res);
33265  return result;
33266 }
33267 static int
33268 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
33269  PyObject* tmp;
33270  if (!value) {
33271  value = Py_None;
33272  } else if (value != Py_None && !PyTuple_Check(value)) {
33273  PyErr_SetString(PyExc_TypeError,
33274  "__defaults__ must be set to a tuple object");
33275  return -1;
33276  }
33277  Py_INCREF(value);
33278  tmp = op->defaults_tuple;
33279  op->defaults_tuple = value;
33280  Py_XDECREF(tmp);
33281  return 0;
33282 }
33283 static PyObject *
33284 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
33285  PyObject* result = op->defaults_tuple;
33286  if (unlikely(!result)) {
33287  if (op->defaults_getter) {
33288  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
33289  result = op->defaults_tuple;
33290  } else {
33291  result = Py_None;
33292  }
33293  }
33294  Py_INCREF(result);
33295  return result;
33296 }
33297 static int
33298 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
33299  PyObject* tmp;
33300  if (!value) {
33301  value = Py_None;
33302  } else if (value != Py_None && !PyDict_Check(value)) {
33303  PyErr_SetString(PyExc_TypeError,
33304  "__kwdefaults__ must be set to a dict object");
33305  return -1;
33306  }
33307  Py_INCREF(value);
33308  tmp = op->defaults_kwdict;
33309  op->defaults_kwdict = value;
33310  Py_XDECREF(tmp);
33311  return 0;
33312 }
33313 static PyObject *
33314 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
33315  PyObject* result = op->defaults_kwdict;
33316  if (unlikely(!result)) {
33317  if (op->defaults_getter) {
33318  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
33319  result = op->defaults_kwdict;
33320  } else {
33321  result = Py_None;
33322  }
33323  }
33324  Py_INCREF(result);
33325  return result;
33326 }
33327 static int
33328 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
33329  PyObject* tmp;
33330  if (!value || value == Py_None) {
33331  value = NULL;
33332  } else if (!PyDict_Check(value)) {
33333  PyErr_SetString(PyExc_TypeError,
33334  "__annotations__ must be set to a dict object");
33335  return -1;
33336  }
33337  Py_XINCREF(value);
33338  tmp = op->func_annotations;
33339  op->func_annotations = value;
33340  Py_XDECREF(tmp);
33341  return 0;
33342 }
33343 static PyObject *
33344 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
33345  PyObject* result = op->func_annotations;
33346  if (unlikely(!result)) {
33347  result = PyDict_New();
33348  if (unlikely(!result)) return NULL;
33349  op->func_annotations = result;
33350  }
33351  Py_INCREF(result);
33352  return result;
33353 }
33354 static PyGetSetDef __pyx_CyFunction_getsets[] = {
33355  {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
33356  {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
33357  {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
33358  {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
33359  {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
33360  {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
33361  {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
33362  {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
33363  {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
33364  {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
33365  {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
33366  {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
33367  {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
33368  {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
33369  {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
33370  {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
33371  {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
33372  {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
33373  {0, 0, 0, 0, 0}
33374 };
33375 static PyMemberDef __pyx_CyFunction_members[] = {
33376  {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
33377  {0, 0, 0, 0, 0}
33378 };
33379 static PyObject *
33380 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
33381 {
33382 #if PY_MAJOR_VERSION >= 3
33383  return PyUnicode_FromString(m->func.m_ml->ml_name);
33384 #else
33385  return PyString_FromString(m->func.m_ml->ml_name);
33386 #endif
33387 }
33388 static PyMethodDef __pyx_CyFunction_methods[] = {
33389  {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
33390  {0, 0, 0, 0}
33391 };
33392 #if PY_VERSION_HEX < 0x030500A0
33393 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
33394 #else
33395 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
33396 #endif
33397 static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
33398  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
33399  __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
33400  if (op == NULL)
33401  return NULL;
33402  op->flags = flags;
33403  __Pyx_CyFunction_weakreflist(op) = NULL;
33404  op->func.m_ml = ml;
33405  op->func.m_self = (PyObject *) op;
33406  Py_XINCREF(closure);
33407  op->func_closure = closure;
33408  Py_XINCREF(module);
33409  op->func.m_module = module;
33410  op->func_dict = NULL;
33411  op->func_name = NULL;
33412  Py_INCREF(qualname);
33413  op->func_qualname = qualname;
33414  op->func_doc = NULL;
33415  op->func_classobj = NULL;
33416  op->func_globals = globals;
33417  Py_INCREF(op->func_globals);
33418  Py_XINCREF(code);
33419  op->func_code = code;
33420  op->defaults_pyobjects = 0;
33421  op->defaults = NULL;
33422  op->defaults_tuple = NULL;
33423  op->defaults_kwdict = NULL;
33424  op->defaults_getter = NULL;
33425  op->func_annotations = NULL;
33426  PyObject_GC_Track(op);
33427  return (PyObject *) op;
33428 }
33429 static int
33430 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
33431 {
33432  Py_CLEAR(m->func_closure);
33433  Py_CLEAR(m->func.m_module);
33434  Py_CLEAR(m->func_dict);
33435  Py_CLEAR(m->func_name);
33436  Py_CLEAR(m->func_qualname);
33437  Py_CLEAR(m->func_doc);
33438  Py_CLEAR(m->func_globals);
33439  Py_CLEAR(m->func_code);
33440  Py_CLEAR(m->func_classobj);
33441  Py_CLEAR(m->defaults_tuple);
33442  Py_CLEAR(m->defaults_kwdict);
33443  Py_CLEAR(m->func_annotations);
33444  if (m->defaults) {
33445  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
33446  int i;
33447  for (i = 0; i < m->defaults_pyobjects; i++)
33448  Py_XDECREF(pydefaults[i]);
33449  PyObject_Free(m->defaults);
33450  m->defaults = NULL;
33451  }
33452  return 0;
33453 }
33454 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
33455 {
33456  PyObject_GC_UnTrack(m);
33457  if (__Pyx_CyFunction_weakreflist(m) != NULL)
33458  PyObject_ClearWeakRefs((PyObject *) m);
33459  __Pyx_CyFunction_clear(m);
33460  PyObject_GC_Del(m);
33461 }
33462 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
33463 {
33464  Py_VISIT(m->func_closure);
33465  Py_VISIT(m->func.m_module);
33466  Py_VISIT(m->func_dict);
33467  Py_VISIT(m->func_name);
33468  Py_VISIT(m->func_qualname);
33469  Py_VISIT(m->func_doc);
33470  Py_VISIT(m->func_globals);
33471  Py_VISIT(m->func_code);
33472  Py_VISIT(m->func_classobj);
33473  Py_VISIT(m->defaults_tuple);
33474  Py_VISIT(m->defaults_kwdict);
33475  if (m->defaults) {
33476  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
33477  int i;
33478  for (i = 0; i < m->defaults_pyobjects; i++)
33479  Py_VISIT(pydefaults[i]);
33480  }
33481  return 0;
33482 }
33483 static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
33484 {
33485  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
33486  if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
33487  Py_INCREF(func);
33488  return func;
33489  }
33490  if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
33491  if (type == NULL)
33492  type = (PyObject *)(Py_TYPE(obj));
33493  return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
33494  }
33495  if (obj == Py_None)
33496  obj = NULL;
33497  return __Pyx_PyMethod_New(func, obj, type);
33498 }
33499 static PyObject*
33500 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
33501 {
33502 #if PY_MAJOR_VERSION >= 3
33503  return PyUnicode_FromFormat("<cyfunction %U at %p>",
33504  op->func_qualname, (void *)op);
33505 #else
33506  return PyString_FromFormat("<cyfunction %s at %p>",
33507  PyString_AsString(op->func_qualname), (void *)op);
33508 #endif
33509 }
33510 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
33511  PyCFunctionObject* f = (PyCFunctionObject*)func;
33512  PyCFunction meth = f->m_ml->ml_meth;
33513  Py_ssize_t size;
33514  switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
33515  case METH_VARARGS:
33516  if (likely(kw == NULL || PyDict_Size(kw) == 0))
33517  return (*meth)(self, arg);
33518  break;
33519  case METH_VARARGS | METH_KEYWORDS:
33520  return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
33521  case METH_NOARGS:
33522  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
33523  size = PyTuple_GET_SIZE(arg);
33524  if (likely(size == 0))
33525  return (*meth)(self, NULL);
33526  PyErr_Format(PyExc_TypeError,
33527  "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
33528  f->m_ml->ml_name, size);
33529  return NULL;
33530  }
33531  break;
33532  case METH_O:
33533  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
33534  size = PyTuple_GET_SIZE(arg);
33535  if (likely(size == 1)) {
33536  PyObject *result, *arg0 = PySequence_ITEM(arg, 0);
33537  if (unlikely(!arg0)) return NULL;
33538  result = (*meth)(self, arg0);
33539  Py_DECREF(arg0);
33540  return result;
33541  }
33542  PyErr_Format(PyExc_TypeError,
33543  "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
33544  f->m_ml->ml_name, size);
33545  return NULL;
33546  }
33547  break;
33548  default:
33549  PyErr_SetString(PyExc_SystemError, "Bad call flags in "
33550  "__Pyx_CyFunction_Call. METH_OLDARGS is no "
33551  "longer supported!");
33552  return NULL;
33553  }
33554  PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
33555  f->m_ml->ml_name);
33556  return NULL;
33557 }
33558 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
33559  return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
33560 }
33561 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
33562  PyObject *result;
33563  __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
33564  if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
33565  Py_ssize_t argc;
33566  PyObject *new_args;
33567  PyObject *self;
33568  argc = PyTuple_GET_SIZE(args);
33569  new_args = PyTuple_GetSlice(args, 1, argc);
33570  if (unlikely(!new_args))
33571  return NULL;
33572  self = PyTuple_GetItem(args, 0);
33573  if (unlikely(!self)) {
33574  Py_DECREF(new_args);
33575  return NULL;
33576  }
33577  result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
33578  Py_DECREF(new_args);
33579  } else {
33580  result = __Pyx_CyFunction_Call(func, args, kw);
33581  }
33582  return result;
33583 }
33584 static PyTypeObject __pyx_CyFunctionType_type = {
33585  PyVarObject_HEAD_INIT(0, 0)
33586  "cython_function_or_method",
33587  sizeof(__pyx_CyFunctionObject),
33588  0,
33589  (destructor) __Pyx_CyFunction_dealloc,
33590  0,
33591  0,
33592  0,
33593 #if PY_MAJOR_VERSION < 3
33594  0,
33595 #else
33596  0,
33597 #endif
33598  (reprfunc) __Pyx_CyFunction_repr,
33599  0,
33600  0,
33601  0,
33602  0,
33603  __Pyx_CyFunction_CallAsMethod,
33604  0,
33605  0,
33606  0,
33607  0,
33608  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
33609  0,
33610  (traverseproc) __Pyx_CyFunction_traverse,
33611  (inquiry) __Pyx_CyFunction_clear,
33612  0,
33613 #if PY_VERSION_HEX < 0x030500A0
33614  offsetof(__pyx_CyFunctionObject, func_weakreflist),
33615 #else
33616  offsetof(PyCFunctionObject, m_weakreflist),
33617 #endif
33618  0,
33619  0,
33620  __pyx_CyFunction_methods,
33621  __pyx_CyFunction_members,
33622  __pyx_CyFunction_getsets,
33623  0,
33624  0,
33625  __Pyx_CyFunction_descr_get,
33626  0,
33627  offsetof(__pyx_CyFunctionObject, func_dict),
33628  0,
33629  0,
33630  0,
33631  0,
33632  0,
33633  0,
33634  0,
33635  0,
33636  0,
33637  0,
33638  0,
33639  0,
33640 #if PY_VERSION_HEX >= 0x030400a1
33641  0,
33642 #endif
33643 };
33644 static int __pyx_CyFunction_init(void) {
33645  __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
33646  if (__pyx_CyFunctionType == NULL) {
33647  return -1;
33648  }
33649  return 0;
33650 }
33651 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
33652  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
33653  m->defaults = PyObject_Malloc(size);
33654  if (!m->defaults)
33655  return PyErr_NoMemory();
33656  memset(m->defaults, 0, size);
33657  m->defaults_pyobjects = pyobjects;
33658  return m->defaults;
33659 }
33660 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
33661  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
33662  m->defaults_tuple = tuple;
33663  Py_INCREF(tuple);
33664 }
33665 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
33666  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
33667  m->defaults_kwdict = dict;
33668  Py_INCREF(dict);
33669 }
33670 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
33671  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
33672  m->func_annotations = dict;
33673  Py_INCREF(dict);
33674 }
33675 
33676 /* Py3ClassCreate */
33677  static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
33678  PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
33679  PyObject *ns;
33680  if (metaclass) {
33681  PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
33682  if (prep) {
33683  PyObject *pargs = PyTuple_Pack(2, name, bases);
33684  if (unlikely(!pargs)) {
33685  Py_DECREF(prep);
33686  return NULL;
33687  }
33688  ns = PyObject_Call(prep, pargs, mkw);
33689  Py_DECREF(prep);
33690  Py_DECREF(pargs);
33691  } else {
33692  if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
33693  return NULL;
33694  PyErr_Clear();
33695  ns = PyDict_New();
33696  }
33697  } else {
33698  ns = PyDict_New();
33699  }
33700  if (unlikely(!ns))
33701  return NULL;
33702  if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
33703  if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
33704  if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
33705  return ns;
33706 bad:
33707  Py_DECREF(ns);
33708  return NULL;
33709 }
33710 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
33711  PyObject *dict, PyObject *mkw,
33712  int calculate_metaclass, int allow_py2_metaclass) {
33713  PyObject *result, *margs;
33714  PyObject *owned_metaclass = NULL;
33715  if (allow_py2_metaclass) {
33716  owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
33717  if (owned_metaclass) {
33718  metaclass = owned_metaclass;
33719  } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
33720  PyErr_Clear();
33721  } else {
33722  return NULL;
33723  }
33724  }
33725  if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
33726  metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
33727  Py_XDECREF(owned_metaclass);
33728  if (unlikely(!metaclass))
33729  return NULL;
33730  owned_metaclass = metaclass;
33731  }
33732  margs = PyTuple_Pack(3, name, bases, dict);
33733  if (unlikely(!margs)) {
33734  result = NULL;
33735  } else {
33736  result = PyObject_Call(metaclass, margs, mkw);
33737  Py_DECREF(margs);
33738  }
33739  Py_XDECREF(owned_metaclass);
33740  return result;
33741 }
33742 
33743 /* CodeObjectCache */
33744  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
33745  int start = 0, mid = 0, end = count - 1;
33746  if (end >= 0 && code_line > entries[end].code_line) {
33747  return count;
33748  }
33749  while (start < end) {
33750  mid = start + (end - start) / 2;
33751  if (code_line < entries[mid].code_line) {
33752  end = mid;
33753  } else if (code_line > entries[mid].code_line) {
33754  start = mid + 1;
33755  } else {
33756  return mid;
33757  }
33758  }
33759  if (code_line <= entries[mid].code_line) {
33760  return mid;
33761  } else {
33762  return mid + 1;
33763  }
33764 }
33765 static PyCodeObject *__pyx_find_code_object(int code_line) {
33766  PyCodeObject* code_object;
33767  int pos;
33768  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
33769  return NULL;
33770  }
33771  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
33772  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
33773  return NULL;
33774  }
33775  code_object = __pyx_code_cache.entries[pos].code_object;
33776  Py_INCREF(code_object);
33777  return code_object;
33778 }
33779 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
33780  int pos, i;
33781  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
33782  if (unlikely(!code_line)) {
33783  return;
33784  }
33785  if (unlikely(!entries)) {
33786  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
33787  if (likely(entries)) {
33788  __pyx_code_cache.entries = entries;
33789  __pyx_code_cache.max_count = 64;
33790  __pyx_code_cache.count = 1;
33791  entries[0].code_line = code_line;
33792  entries[0].code_object = code_object;
33793  Py_INCREF(code_object);
33794  }
33795  return;
33796  }
33797  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
33798  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
33799  PyCodeObject* tmp = entries[pos].code_object;
33800  entries[pos].code_object = code_object;
33801  Py_DECREF(tmp);
33802  return;
33803  }
33804  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
33805  int new_max = __pyx_code_cache.max_count + 64;
33806  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
33807  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
33808  if (unlikely(!entries)) {
33809  return;
33810  }
33811  __pyx_code_cache.entries = entries;
33812  __pyx_code_cache.max_count = new_max;
33813  }
33814  for (i=__pyx_code_cache.count; i>pos; i--) {
33815  entries[i] = entries[i-1];
33816  }
33817  entries[pos].code_line = code_line;
33818  entries[pos].code_object = code_object;
33819  __pyx_code_cache.count++;
33820  Py_INCREF(code_object);
33821 }
33822 
33823 /* AddTraceback */
33824  #include "compile.h"
33825 #include "frameobject.h"
33826 #include "traceback.h"
33827 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
33828  const char *funcname, int c_line,
33829  int py_line, const char *filename) {
33830  PyCodeObject *py_code = 0;
33831  PyObject *py_srcfile = 0;
33832  PyObject *py_funcname = 0;
33833  #if PY_MAJOR_VERSION < 3
33834  py_srcfile = PyString_FromString(filename);
33835  #else
33836  py_srcfile = PyUnicode_FromString(filename);
33837  #endif
33838  if (!py_srcfile) goto bad;
33839  if (c_line) {
33840  #if PY_MAJOR_VERSION < 3
33841  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
33842  #else
33843  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
33844  #endif
33845  }
33846  else {
33847  #if PY_MAJOR_VERSION < 3
33848  py_funcname = PyString_FromString(funcname);
33849  #else
33850  py_funcname = PyUnicode_FromString(funcname);
33851  #endif
33852  }
33853  if (!py_funcname) goto bad;
33854  py_code = __Pyx_PyCode_New(
33855  0,
33856  0,
33857  0,
33858  0,
33859  0,
33860  __pyx_empty_bytes, /*PyObject *code,*/
33861  __pyx_empty_tuple, /*PyObject *consts,*/
33862  __pyx_empty_tuple, /*PyObject *names,*/
33863  __pyx_empty_tuple, /*PyObject *varnames,*/
33864  __pyx_empty_tuple, /*PyObject *freevars,*/
33865  __pyx_empty_tuple, /*PyObject *cellvars,*/
33866  py_srcfile, /*PyObject *filename,*/
33867  py_funcname, /*PyObject *name,*/
33868  py_line,
33869  __pyx_empty_bytes /*PyObject *lnotab*/
33870  );
33871  Py_DECREF(py_srcfile);
33872  Py_DECREF(py_funcname);
33873  return py_code;
33874 bad:
33875  Py_XDECREF(py_srcfile);
33876  Py_XDECREF(py_funcname);
33877  return NULL;
33878 }
33879 static void __Pyx_AddTraceback(const char *funcname, int c_line,
33880  int py_line, const char *filename) {
33881  PyCodeObject *py_code = 0;
33882  PyFrameObject *py_frame = 0;
33883  py_code = __pyx_find_code_object(c_line ? c_line : py_line);
33884  if (!py_code) {
33885  py_code = __Pyx_CreateCodeObjectForTraceback(
33886  funcname, c_line, py_line, filename);
33887  if (!py_code) goto bad;
33888  __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
33889  }
33890  py_frame = PyFrame_New(
33891  PyThreadState_GET(), /*PyThreadState *tstate,*/
33892  py_code, /*PyCodeObject *code,*/
33893  __pyx_d, /*PyObject *globals,*/
33894  0 /*PyObject *locals*/
33895  );
33896  if (!py_frame) goto bad;
33897  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
33898  PyTraceBack_Here(py_frame);
33899 bad:
33900  Py_XDECREF(py_code);
33901  Py_XDECREF(py_frame);
33902 }
33903 
33904 /* CIntFromPyVerify */
33905  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
33906  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
33907 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
33908  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
33909 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
33910  {\
33911  func_type value = func_value;\
33912  if (sizeof(target_type) < sizeof(func_type)) {\
33913  if (unlikely(value != (func_type) (target_type) value)) {\
33914  func_type zero = 0;\
33915  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
33916  return (target_type) -1;\
33917  if (is_unsigned && unlikely(value < zero))\
33918  goto raise_neg_overflow;\
33919  else\
33920  goto raise_overflow;\
33921  }\
33922  }\
33923  return (target_type) value;\
33924  }
33925 
33926 /* CIntToPy */
33927  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
33928  const long neg_one = (long) -1, const_zero = (long) 0;
33929  const int is_unsigned = neg_one > const_zero;
33930  if (is_unsigned) {
33931  if (sizeof(long) < sizeof(long)) {
33932  return PyInt_FromLong((long) value);
33933  } else if (sizeof(long) <= sizeof(unsigned long)) {
33934  return PyLong_FromUnsignedLong((unsigned long) value);
33935 #ifdef HAVE_LONG_LONG
33936  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
33937  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
33938 #endif
33939  }
33940  } else {
33941  if (sizeof(long) <= sizeof(long)) {
33942  return PyInt_FromLong((long) value);
33943 #ifdef HAVE_LONG_LONG
33944  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
33945  return PyLong_FromLongLong((PY_LONG_LONG) value);
33946 #endif
33947  }
33948  }
33949  {
33950  int one = 1; int little = (int)*(unsigned char *)&one;
33951  unsigned char *bytes = (unsigned char *)&value;
33952  return _PyLong_FromByteArray(bytes, sizeof(long),
33953  little, !is_unsigned);
33954  }
33955 }
33956 
33957 /* Declarations */
33958  #if CYTHON_CCOMPLEX
33959  #ifdef __cplusplus
33960  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
33961  return ::std::complex< float >(x, y);
33962  }
33963  #else
33964  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
33965  return x + y*(__pyx_t_float_complex)_Complex_I;
33966  }
33967  #endif
33968 #else
33969  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
33970  __pyx_t_float_complex z;
33971  z.real = x;
33972  z.imag = y;
33973  return z;
33974  }
33975 #endif
33976 
33977 /* Arithmetic */
33978  #if CYTHON_CCOMPLEX
33979 #else
33980  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33981  return (a.real == b.real) && (a.imag == b.imag);
33982  }
33983  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33984  __pyx_t_float_complex z;
33985  z.real = a.real + b.real;
33986  z.imag = a.imag + b.imag;
33987  return z;
33988  }
33989  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33990  __pyx_t_float_complex z;
33991  z.real = a.real - b.real;
33992  z.imag = a.imag - b.imag;
33993  return z;
33994  }
33995  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33996  __pyx_t_float_complex z;
33997  z.real = a.real * b.real - a.imag * b.imag;
33998  z.imag = a.real * b.imag + a.imag * b.real;
33999  return z;
34000  }
34001  #if 1
34002  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
34003  if (b.imag == 0) {
34004  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
34005  } else if (fabsf(b.real) >= fabsf(b.imag)) {
34006  if (b.real == 0 && b.imag == 0) {
34007  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
34008  } else {
34009  float r = b.imag / b.real;
34010  float s = 1.0 / (b.real + b.imag * r);
34011  return __pyx_t_float_complex_from_parts(
34012  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
34013  }
34014  } else {
34015  float r = b.real / b.imag;
34016  float s = 1.0 / (b.imag + b.real * r);
34017  return __pyx_t_float_complex_from_parts(
34018  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
34019  }
34020  }
34021  #else
34022  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
34023  if (b.imag == 0) {
34024  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
34025  } else {
34026  float denom = b.real * b.real + b.imag * b.imag;
34027  return __pyx_t_float_complex_from_parts(
34028  (a.real * b.real + a.imag * b.imag) / denom,
34029  (a.imag * b.real - a.real * b.imag) / denom);
34030  }
34031  }
34032  #endif
34033  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
34034  __pyx_t_float_complex z;
34035  z.real = -a.real;
34036  z.imag = -a.imag;
34037  return z;
34038  }
34039  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
34040  return (a.real == 0) && (a.imag == 0);
34041  }
34042  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
34043  __pyx_t_float_complex z;
34044  z.real = a.real;
34045  z.imag = -a.imag;
34046  return z;
34047  }
34048  #if 1
34049  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
34050  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
34051  return sqrtf(z.real*z.real + z.imag*z.imag);
34052  #else
34053  return hypotf(z.real, z.imag);
34054  #endif
34055  }
34056  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
34057  __pyx_t_float_complex z;
34058  float r, lnr, theta, z_r, z_theta;
34059  if (b.imag == 0 && b.real == (int)b.real) {
34060  if (b.real < 0) {
34061  float denom = a.real * a.real + a.imag * a.imag;
34062  a.real = a.real / denom;
34063  a.imag = -a.imag / denom;
34064  b.real = -b.real;
34065  }
34066  switch ((int)b.real) {
34067  case 0:
34068  z.real = 1;
34069  z.imag = 0;
34070  return z;
34071  case 1:
34072  return a;
34073  case 2:
34074  z = __Pyx_c_prod_float(a, a);
34075  return __Pyx_c_prod_float(a, a);
34076  case 3:
34077  z = __Pyx_c_prod_float(a, a);
34078  return __Pyx_c_prod_float(z, a);
34079  case 4:
34080  z = __Pyx_c_prod_float(a, a);
34081  return __Pyx_c_prod_float(z, z);
34082  }
34083  }
34084  if (a.imag == 0) {
34085  if (a.real == 0) {
34086  return a;
34087  } else if (b.imag == 0) {
34088  z.real = powf(a.real, b.real);
34089  z.imag = 0;
34090  return z;
34091  } else if (a.real > 0) {
34092  r = a.real;
34093  theta = 0;
34094  } else {
34095  r = -a.real;
34096  theta = atan2f(0, -1);
34097  }
34098  } else {
34099  r = __Pyx_c_abs_float(a);
34100  theta = atan2f(a.imag, a.real);
34101  }
34102  lnr = logf(r);
34103  z_r = expf(lnr * b.real - theta * b.imag);
34104  z_theta = theta * b.real + lnr * b.imag;
34105  z.real = z_r * cosf(z_theta);
34106  z.imag = z_r * sinf(z_theta);
34107  return z;
34108  }
34109  #endif
34110 #endif
34111 
34112 /* Declarations */
34113  #if CYTHON_CCOMPLEX
34114  #ifdef __cplusplus
34115  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
34116  return ::std::complex< double >(x, y);
34117  }
34118  #else
34119  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
34120  return x + y*(__pyx_t_double_complex)_Complex_I;
34121  }
34122  #endif
34123 #else
34124  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
34125  __pyx_t_double_complex z;
34126  z.real = x;
34127  z.imag = y;
34128  return z;
34129  }
34130 #endif
34131 
34132 /* Arithmetic */
34133  #if CYTHON_CCOMPLEX
34134 #else
34135  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34136  return (a.real == b.real) && (a.imag == b.imag);
34137  }
34138  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34139  __pyx_t_double_complex z;
34140  z.real = a.real + b.real;
34141  z.imag = a.imag + b.imag;
34142  return z;
34143  }
34144  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34145  __pyx_t_double_complex z;
34146  z.real = a.real - b.real;
34147  z.imag = a.imag - b.imag;
34148  return z;
34149  }
34150  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34151  __pyx_t_double_complex z;
34152  z.real = a.real * b.real - a.imag * b.imag;
34153  z.imag = a.real * b.imag + a.imag * b.real;
34154  return z;
34155  }
34156  #if 1
34157  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34158  if (b.imag == 0) {
34159  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
34160  } else if (fabs(b.real) >= fabs(b.imag)) {
34161  if (b.real == 0 && b.imag == 0) {
34162  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
34163  } else {
34164  double r = b.imag / b.real;
34165  double s = 1.0 / (b.real + b.imag * r);
34166  return __pyx_t_double_complex_from_parts(
34167  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
34168  }
34169  } else {
34170  double r = b.real / b.imag;
34171  double s = 1.0 / (b.imag + b.real * r);
34172  return __pyx_t_double_complex_from_parts(
34173  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
34174  }
34175  }
34176  #else
34177  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34178  if (b.imag == 0) {
34179  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
34180  } else {
34181  double denom = b.real * b.real + b.imag * b.imag;
34182  return __pyx_t_double_complex_from_parts(
34183  (a.real * b.real + a.imag * b.imag) / denom,
34184  (a.imag * b.real - a.real * b.imag) / denom);
34185  }
34186  }
34187  #endif
34188  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
34189  __pyx_t_double_complex z;
34190  z.real = -a.real;
34191  z.imag = -a.imag;
34192  return z;
34193  }
34194  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
34195  return (a.real == 0) && (a.imag == 0);
34196  }
34197  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
34198  __pyx_t_double_complex z;
34199  z.real = a.real;
34200  z.imag = -a.imag;
34201  return z;
34202  }
34203  #if 1
34204  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
34205  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
34206  return sqrt(z.real*z.real + z.imag*z.imag);
34207  #else
34208  return hypot(z.real, z.imag);
34209  #endif
34210  }
34211  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34212  __pyx_t_double_complex z;
34213  double r, lnr, theta, z_r, z_theta;
34214  if (b.imag == 0 && b.real == (int)b.real) {
34215  if (b.real < 0) {
34216  double denom = a.real * a.real + a.imag * a.imag;
34217  a.real = a.real / denom;
34218  a.imag = -a.imag / denom;
34219  b.real = -b.real;
34220  }
34221  switch ((int)b.real) {
34222  case 0:
34223  z.real = 1;
34224  z.imag = 0;
34225  return z;
34226  case 1:
34227  return a;
34228  case 2:
34229  z = __Pyx_c_prod_double(a, a);
34230  return __Pyx_c_prod_double(a, a);
34231  case 3:
34232  z = __Pyx_c_prod_double(a, a);
34233  return __Pyx_c_prod_double(z, a);
34234  case 4:
34235  z = __Pyx_c_prod_double(a, a);
34236  return __Pyx_c_prod_double(z, z);
34237  }
34238  }
34239  if (a.imag == 0) {
34240  if (a.real == 0) {
34241  return a;
34242  } else if (b.imag == 0) {
34243  z.real = pow(a.real, b.real);
34244  z.imag = 0;
34245  return z;
34246  } else if (a.real > 0) {
34247  r = a.real;
34248  theta = 0;
34249  } else {
34250  r = -a.real;
34251  theta = atan2(0, -1);
34252  }
34253  } else {
34254  r = __Pyx_c_abs_double(a);
34255  theta = atan2(a.imag, a.real);
34256  }
34257  lnr = log(r);
34258  z_r = exp(lnr * b.real - theta * b.imag);
34259  z_theta = theta * b.real + lnr * b.imag;
34260  z.real = z_r * cos(z_theta);
34261  z.imag = z_r * sin(z_theta);
34262  return z;
34263  }
34264  #endif
34265 #endif
34266 
34267 /* CIntToPy */
34268  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
34269  const int neg_one = (int) -1, const_zero = (int) 0;
34270  const int is_unsigned = neg_one > const_zero;
34271  if (is_unsigned) {
34272  if (sizeof(int) < sizeof(long)) {
34273  return PyInt_FromLong((long) value);
34274  } else if (sizeof(int) <= sizeof(unsigned long)) {
34275  return PyLong_FromUnsignedLong((unsigned long) value);
34276 #ifdef HAVE_LONG_LONG
34277  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
34278  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
34279 #endif
34280  }
34281  } else {
34282  if (sizeof(int) <= sizeof(long)) {
34283  return PyInt_FromLong((long) value);
34284 #ifdef HAVE_LONG_LONG
34285  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
34286  return PyLong_FromLongLong((PY_LONG_LONG) value);
34287 #endif
34288  }
34289  }
34290  {
34291  int one = 1; int little = (int)*(unsigned char *)&one;
34292  unsigned char *bytes = (unsigned char *)&value;
34293  return _PyLong_FromByteArray(bytes, sizeof(int),
34294  little, !is_unsigned);
34295  }
34296 }
34297 
34298 /* CIntToPy */
34299  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
34300  const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0;
34301  const int is_unsigned = neg_one > const_zero;
34302  if (is_unsigned) {
34303  if (sizeof(enum NPY_TYPES) < sizeof(long)) {
34304  return PyInt_FromLong((long) value);
34305  } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
34306  return PyLong_FromUnsignedLong((unsigned long) value);
34307 #ifdef HAVE_LONG_LONG
34308  } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
34309  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
34310 #endif
34311  }
34312  } else {
34313  if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
34314  return PyInt_FromLong((long) value);
34315 #ifdef HAVE_LONG_LONG
34316  } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
34317  return PyLong_FromLongLong((PY_LONG_LONG) value);
34318 #endif
34319  }
34320  }
34321  {
34322  int one = 1; int little = (int)*(unsigned char *)&one;
34323  unsigned char *bytes = (unsigned char *)&value;
34324  return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
34325  little, !is_unsigned);
34326  }
34327 }
34328 
34329 /* CIntFromPy */
34330  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
34331  const int neg_one = (int) -1, const_zero = (int) 0;
34332  const int is_unsigned = neg_one > const_zero;
34333 #if PY_MAJOR_VERSION < 3
34334  if (likely(PyInt_Check(x))) {
34335  if (sizeof(int) < sizeof(long)) {
34336  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
34337  } else {
34338  long val = PyInt_AS_LONG(x);
34339  if (is_unsigned && unlikely(val < 0)) {
34340  goto raise_neg_overflow;
34341  }
34342  return (int) val;
34343  }
34344  } else
34345 #endif
34346  if (likely(PyLong_Check(x))) {
34347  if (is_unsigned) {
34348 #if CYTHON_USE_PYLONG_INTERNALS
34349  const digit* digits = ((PyLongObject*)x)->ob_digit;
34350  switch (Py_SIZE(x)) {
34351  case 0: return (int) 0;
34352  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
34353  case 2:
34354  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
34355  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
34356  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34357  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
34358  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
34359  }
34360  }
34361  break;
34362  case 3:
34363  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
34364  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
34365  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34366  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
34367  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
34368  }
34369  }
34370  break;
34371  case 4:
34372  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
34373  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
34374  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34375  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
34376  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
34377  }
34378  }
34379  break;
34380  }
34381 #endif
34382 #if CYTHON_COMPILING_IN_CPYTHON
34383  if (unlikely(Py_SIZE(x) < 0)) {
34384  goto raise_neg_overflow;
34385  }
34386 #else
34387  {
34388  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
34389  if (unlikely(result < 0))
34390  return (int) -1;
34391  if (unlikely(result == 1))
34392  goto raise_neg_overflow;
34393  }
34394 #endif
34395  if (sizeof(int) <= sizeof(unsigned long)) {
34396  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
34397 #ifdef HAVE_LONG_LONG
34398  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
34399  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
34400 #endif
34401  }
34402  } else {
34403 #if CYTHON_USE_PYLONG_INTERNALS
34404  const digit* digits = ((PyLongObject*)x)->ob_digit;
34405  switch (Py_SIZE(x)) {
34406  case 0: return (int) 0;
34407  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
34408  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
34409  case -2:
34410  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
34411  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
34412  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34413  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
34414  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
34415  }
34416  }
34417  break;
34418  case 2:
34419  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
34420  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
34421  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34422  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
34423  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
34424  }
34425  }
34426  break;
34427  case -3:
34428  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
34429  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
34430  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34431  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
34432  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
34433  }
34434  }
34435  break;
34436  case 3:
34437  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
34438  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
34439  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34440  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
34441  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
34442  }
34443  }
34444  break;
34445  case -4:
34446  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
34447  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
34448  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34449  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
34450  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
34451  }
34452  }
34453  break;
34454  case 4:
34455  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
34456  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
34457  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34458  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
34459  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
34460  }
34461  }
34462  break;
34463  }
34464 #endif
34465  if (sizeof(int) <= sizeof(long)) {
34466  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
34467 #ifdef HAVE_LONG_LONG
34468  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
34469  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
34470 #endif
34471  }
34472  }
34473  {
34474 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
34475  PyErr_SetString(PyExc_RuntimeError,
34476  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
34477 #else
34478  int val;
34479  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
34480  #if PY_MAJOR_VERSION < 3
34481  if (likely(v) && !PyLong_Check(v)) {
34482  PyObject *tmp = v;
34483  v = PyNumber_Long(tmp);
34484  Py_DECREF(tmp);
34485  }
34486  #endif
34487  if (likely(v)) {
34488  int one = 1; int is_little = (int)*(unsigned char *)&one;
34489  unsigned char *bytes = (unsigned char *)&val;
34490  int ret = _PyLong_AsByteArray((PyLongObject *)v,
34491  bytes, sizeof(val),
34492  is_little, !is_unsigned);
34493  Py_DECREF(v);
34494  if (likely(!ret))
34495  return val;
34496  }
34497 #endif
34498  return (int) -1;
34499  }
34500  } else {
34501  int val;
34502  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
34503  if (!tmp) return (int) -1;
34504  val = __Pyx_PyInt_As_int(tmp);
34505  Py_DECREF(tmp);
34506  return val;
34507  }
34508 raise_overflow:
34509  PyErr_SetString(PyExc_OverflowError,
34510  "value too large to convert to int");
34511  return (int) -1;
34512 raise_neg_overflow:
34513  PyErr_SetString(PyExc_OverflowError,
34514  "can't convert negative value to int");
34515  return (int) -1;
34516 }
34517 
34518 /* CIntFromPy */
34519  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
34520  const long neg_one = (long) -1, const_zero = (long) 0;
34521  const int is_unsigned = neg_one > const_zero;
34522 #if PY_MAJOR_VERSION < 3
34523  if (likely(PyInt_Check(x))) {
34524  if (sizeof(long) < sizeof(long)) {
34525  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
34526  } else {
34527  long val = PyInt_AS_LONG(x);
34528  if (is_unsigned && unlikely(val < 0)) {
34529  goto raise_neg_overflow;
34530  }
34531  return (long) val;
34532  }
34533  } else
34534 #endif
34535  if (likely(PyLong_Check(x))) {
34536  if (is_unsigned) {
34537 #if CYTHON_USE_PYLONG_INTERNALS
34538  const digit* digits = ((PyLongObject*)x)->ob_digit;
34539  switch (Py_SIZE(x)) {
34540  case 0: return (long) 0;
34541  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
34542  case 2:
34543  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
34544  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
34545  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34546  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
34547  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
34548  }
34549  }
34550  break;
34551  case 3:
34552  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
34553  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
34554  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34555  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
34556  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
34557  }
34558  }
34559  break;
34560  case 4:
34561  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
34562  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
34563  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34564  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
34565  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
34566  }
34567  }
34568  break;
34569  }
34570 #endif
34571 #if CYTHON_COMPILING_IN_CPYTHON
34572  if (unlikely(Py_SIZE(x) < 0)) {
34573  goto raise_neg_overflow;
34574  }
34575 #else
34576  {
34577  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
34578  if (unlikely(result < 0))
34579  return (long) -1;
34580  if (unlikely(result == 1))
34581  goto raise_neg_overflow;
34582  }
34583 #endif
34584  if (sizeof(long) <= sizeof(unsigned long)) {
34585  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
34586 #ifdef HAVE_LONG_LONG
34587  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
34588  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
34589 #endif
34590  }
34591  } else {
34592 #if CYTHON_USE_PYLONG_INTERNALS
34593  const digit* digits = ((PyLongObject*)x)->ob_digit;
34594  switch (Py_SIZE(x)) {
34595  case 0: return (long) 0;
34596  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
34597  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
34598  case -2:
34599  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
34600  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
34601  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34602  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
34603  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
34604  }
34605  }
34606  break;
34607  case 2:
34608  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
34609  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
34610  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34611  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
34612  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
34613  }
34614  }
34615  break;
34616  case -3:
34617  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
34618  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
34619  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34620  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
34621  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
34622  }
34623  }
34624  break;
34625  case 3:
34626  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
34627  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
34628  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34629  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
34630  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
34631  }
34632  }
34633  break;
34634  case -4:
34635  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
34636  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
34637  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34638  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
34639  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
34640  }
34641  }
34642  break;
34643  case 4:
34644  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
34645  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
34646  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34647  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
34648  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
34649  }
34650  }
34651  break;
34652  }
34653 #endif
34654  if (sizeof(long) <= sizeof(long)) {
34655  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
34656 #ifdef HAVE_LONG_LONG
34657  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
34658  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
34659 #endif
34660  }
34661  }
34662  {
34663 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
34664  PyErr_SetString(PyExc_RuntimeError,
34665  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
34666 #else
34667  long val;
34668  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
34669  #if PY_MAJOR_VERSION < 3
34670  if (likely(v) && !PyLong_Check(v)) {
34671  PyObject *tmp = v;
34672  v = PyNumber_Long(tmp);
34673  Py_DECREF(tmp);
34674  }
34675  #endif
34676  if (likely(v)) {
34677  int one = 1; int is_little = (int)*(unsigned char *)&one;
34678  unsigned char *bytes = (unsigned char *)&val;
34679  int ret = _PyLong_AsByteArray((PyLongObject *)v,
34680  bytes, sizeof(val),
34681  is_little, !is_unsigned);
34682  Py_DECREF(v);
34683  if (likely(!ret))
34684  return val;
34685  }
34686 #endif
34687  return (long) -1;
34688  }
34689  } else {
34690  long val;
34691  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
34692  if (!tmp) return (long) -1;
34693  val = __Pyx_PyInt_As_long(tmp);
34694  Py_DECREF(tmp);
34695  return val;
34696  }
34697 raise_overflow:
34698  PyErr_SetString(PyExc_OverflowError,
34699  "value too large to convert to long");
34700  return (long) -1;
34701 raise_neg_overflow:
34702  PyErr_SetString(PyExc_OverflowError,
34703  "can't convert negative value to long");
34704  return (long) -1;
34705 }
34706 
34707 /* CheckBinaryVersion */
34708  static int __Pyx_check_binary_version(void) {
34709  char ctversion[4], rtversion[4];
34710  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
34711  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
34712  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
34713  char message[200];
34714  PyOS_snprintf(message, sizeof(message),
34715  "compiletime version %s of module '%.100s' "
34716  "does not match runtime version %s",
34717  ctversion, __Pyx_MODULE_NAME, rtversion);
34718  return PyErr_WarnEx(NULL, message, 1);
34719  }
34720  return 0;
34721 }
34722 
34723 /* ModuleImport */
34724  #ifndef __PYX_HAVE_RT_ImportModule
34725 #define __PYX_HAVE_RT_ImportModule
34726 static PyObject *__Pyx_ImportModule(const char *name) {
34727  PyObject *py_name = 0;
34728  PyObject *py_module = 0;
34729  py_name = __Pyx_PyIdentifier_FromString(name);
34730  if (!py_name)
34731  goto bad;
34732  py_module = PyImport_Import(py_name);
34733  Py_DECREF(py_name);
34734  return py_module;
34735 bad:
34736  Py_XDECREF(py_name);
34737  return 0;
34738 }
34739 #endif
34740 
34741 /* TypeImport */
34742  #ifndef __PYX_HAVE_RT_ImportType
34743 #define __PYX_HAVE_RT_ImportType
34744 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
34745  size_t size, int strict)
34746 {
34747  PyObject *py_module = 0;
34748  PyObject *result = 0;
34749  PyObject *py_name = 0;
34750  char warning[200];
34751  Py_ssize_t basicsize;
34752 #ifdef Py_LIMITED_API
34753  PyObject *py_basicsize;
34754 #endif
34755  py_module = __Pyx_ImportModule(module_name);
34756  if (!py_module)
34757  goto bad;
34758  py_name = __Pyx_PyIdentifier_FromString(class_name);
34759  if (!py_name)
34760  goto bad;
34761  result = PyObject_GetAttr(py_module, py_name);
34762  Py_DECREF(py_name);
34763  py_name = 0;
34764  Py_DECREF(py_module);
34765  py_module = 0;
34766  if (!result)
34767  goto bad;
34768  if (!PyType_Check(result)) {
34769  PyErr_Format(PyExc_TypeError,
34770  "%.200s.%.200s is not a type object",
34771  module_name, class_name);
34772  goto bad;
34773  }
34774 #ifndef Py_LIMITED_API
34775  basicsize = ((PyTypeObject *)result)->tp_basicsize;
34776 #else
34777  py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
34778  if (!py_basicsize)
34779  goto bad;
34780  basicsize = PyLong_AsSsize_t(py_basicsize);
34781  Py_DECREF(py_basicsize);
34782  py_basicsize = 0;
34783  if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
34784  goto bad;
34785 #endif
34786  if (!strict && (size_t)basicsize > size) {
34787  PyOS_snprintf(warning, sizeof(warning),
34788  "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
34789  module_name, class_name, basicsize, size);
34790  if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
34791  }
34792  else if ((size_t)basicsize != size) {
34793  PyErr_Format(PyExc_ValueError,
34794  "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
34795  module_name, class_name, basicsize, size);
34796  goto bad;
34797  }
34798  return (PyTypeObject *)result;
34799 bad:
34800  Py_XDECREF(py_module);
34801  Py_XDECREF(result);
34802  return NULL;
34803 }
34804 #endif
34805 
34806 /* InitStrings */
34807  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
34808  while (t->p) {
34809  #if PY_MAJOR_VERSION < 3
34810  if (t->is_unicode) {
34811  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
34812  } else if (t->intern) {
34813  *t->p = PyString_InternFromString(t->s);
34814  } else {
34815  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
34816  }
34817  #else
34818  if (t->is_unicode | t->is_str) {
34819  if (t->intern) {
34820  *t->p = PyUnicode_InternFromString(t->s);
34821  } else if (t->encoding) {
34822  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
34823  } else {
34824  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
34825  }
34826  } else {
34827  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
34828  }
34829  #endif
34830  if (!*t->p)
34831  return -1;
34832  ++t;
34833  }
34834  return 0;
34835 }
34836 
34837 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
34838  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
34839 }
34840 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
34841  Py_ssize_t ignore;
34842  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
34843 }
34844 static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
34845 #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
34846  if (
34847 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
34848  __Pyx_sys_getdefaultencoding_not_ascii &&
34849 #endif
34850  PyUnicode_Check(o)) {
34851 #if PY_VERSION_HEX < 0x03030000
34852  char* defenc_c;
34853  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
34854  if (!defenc) return NULL;
34855  defenc_c = PyBytes_AS_STRING(defenc);
34856 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
34857  {
34858  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
34859  char* c;
34860  for (c = defenc_c; c < end; c++) {
34861  if ((unsigned char) (*c) >= 128) {
34862  PyUnicode_AsASCIIString(o);
34863  return NULL;
34864  }
34865  }
34866  }
34867 #endif
34868  *length = PyBytes_GET_SIZE(defenc);
34869  return defenc_c;
34870 #else
34871  if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
34872 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
34873  if (PyUnicode_IS_ASCII(o)) {
34874  *length = PyUnicode_GET_LENGTH(o);
34875  return PyUnicode_AsUTF8(o);
34876  } else {
34877  PyUnicode_AsASCIIString(o);
34878  return NULL;
34879  }
34880 #else
34881  return PyUnicode_AsUTF8AndSize(o, length);
34882 #endif
34883 #endif
34884  } else
34885 #endif
34886 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
34887  if (PyByteArray_Check(o)) {
34888  *length = PyByteArray_GET_SIZE(o);
34889  return PyByteArray_AS_STRING(o);
34890  } else
34891 #endif
34892  {
34893  char* result;
34894  int r = PyBytes_AsStringAndSize(o, &result, length);
34895  if (unlikely(r < 0)) {
34896  return NULL;
34897  } else {
34898  return result;
34899  }
34900  }
34901 }
34902 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
34903  int is_true = x == Py_True;
34904  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
34905  else return PyObject_IsTrue(x);
34906 }
34907 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
34908 #if CYTHON_USE_TYPE_SLOTS
34909  PyNumberMethods *m;
34910 #endif
34911  const char *name = NULL;
34912  PyObject *res = NULL;
34913 #if PY_MAJOR_VERSION < 3
34914  if (PyInt_Check(x) || PyLong_Check(x))
34915 #else
34916  if (PyLong_Check(x))
34917 #endif
34918  return __Pyx_NewRef(x);
34919 #if CYTHON_USE_TYPE_SLOTS
34920  m = Py_TYPE(x)->tp_as_number;
34921  #if PY_MAJOR_VERSION < 3
34922  if (m && m->nb_int) {
34923  name = "int";
34924  res = PyNumber_Int(x);
34925  }
34926  else if (m && m->nb_long) {
34927  name = "long";
34928  res = PyNumber_Long(x);
34929  }
34930  #else
34931  if (m && m->nb_int) {
34932  name = "int";
34933  res = PyNumber_Long(x);
34934  }
34935  #endif
34936 #else
34937  res = PyNumber_Int(x);
34938 #endif
34939  if (res) {
34940 #if PY_MAJOR_VERSION < 3
34941  if (!PyInt_Check(res) && !PyLong_Check(res)) {
34942 #else
34943  if (!PyLong_Check(res)) {
34944 #endif
34945  PyErr_Format(PyExc_TypeError,
34946  "__%.4s__ returned non-%.4s (type %.200s)",
34947  name, name, Py_TYPE(res)->tp_name);
34948  Py_DECREF(res);
34949  return NULL;
34950  }
34951  }
34952  else if (!PyErr_Occurred()) {
34953  PyErr_SetString(PyExc_TypeError,
34954  "an integer is required");
34955  }
34956  return res;
34957 }
34958 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
34959  Py_ssize_t ival;
34960  PyObject *x;
34961 #if PY_MAJOR_VERSION < 3
34962  if (likely(PyInt_CheckExact(b))) {
34963  if (sizeof(Py_ssize_t) >= sizeof(long))
34964  return PyInt_AS_LONG(b);
34965  else
34966  return PyInt_AsSsize_t(x);
34967  }
34968 #endif
34969  if (likely(PyLong_CheckExact(b))) {
34970  #if CYTHON_USE_PYLONG_INTERNALS
34971  const digit* digits = ((PyLongObject*)b)->ob_digit;
34972  const Py_ssize_t size = Py_SIZE(b);
34973  if (likely(__Pyx_sst_abs(size) <= 1)) {
34974  ival = likely(size) ? digits[0] : 0;
34975  if (size == -1) ival = -ival;
34976  return ival;
34977  } else {
34978  switch (size) {
34979  case 2:
34980  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
34981  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
34982  }
34983  break;
34984  case -2:
34985  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
34986  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
34987  }
34988  break;
34989  case 3:
34990  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
34991  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
34992  }
34993  break;
34994  case -3:
34995  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
34996  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
34997  }
34998  break;
34999  case 4:
35000  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
35001  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
35002  }
35003  break;
35004  case -4:
35005  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
35006  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
35007  }
35008  break;
35009  }
35010  }
35011  #endif
35012  return PyLong_AsSsize_t(b);
35013  }
35014  x = PyNumber_Index(b);
35015  if (!x) return -1;
35016  ival = PyInt_AsSsize_t(x);
35017  Py_DECREF(x);
35018  return ival;
35019 }
35020 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
35021  return PyInt_FromSize_t(ival);
35022 }
35023 
35024 
35025 #endif /* Py_PYTHON_H */
double f(double C, double b, double a, int q, int r)
cppADR_base * newADR(int nSpaceIn, int nQuadraturePoints_elementIn, int nDOF_mesh_trial_elementIn, int nDOF_trial_elementIn, int nDOF_test_elementIn, int nQuadraturePoints_elementBoundaryIn, int CompKernelFlag)
Definition: ADR.h:1379
#define PyMODINIT_FUNC